Commit ed782f0e authored by jcfr's avatar jcfr
Browse files

COMP: Rename Slicer3_USE_KWWIDGETS into Slicer_USE_KWWIDGETS

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15091 3bd1e089-480b-0410-8dfb-8563597acbee
parent da335c38
......@@ -23,9 +23,9 @@ if(WIN32 AND CMAKE_CONFIGURATION_TYPES)
# here, so we are going to have to stick to the value of CMAKE_BUILD_TYPE
# if it has been set explicitly (by a dashboard for example), or the
# first value in CMAKE_CONFIGURATION_TYPES (i.e. Debug)/
if (Slicer3_USE_KWWIDGETS)
if (Slicer_USE_KWWIDGETS)
kwwidgets_get_cmake_build_type(build_type)
endif (Slicer3_USE_KWWIDGETS)
endif (Slicer_USE_KWWIDGETS)
endif(WIN32 AND CMAKE_CONFIGURATION_TYPES)
#####################
......
......@@ -4,9 +4,9 @@ IF(Slicer_BUILD_CLI)
ADD_SUBDIRECTORY(CLI)
ENDIF(Slicer_BUILD_CLI)
IF (Slicer3_USE_KWWIDGETS)
IF (Slicer_USE_KWWIDGETS)
ADD_SUBDIRECTORY(GUI)
ENDIF (Slicer3_USE_KWWIDGETS)
ENDIF (Slicer_USE_KWWIDGETS)
IF(Slicer_USE_QT)
ADD_SUBDIRECTORY(SlicerQT)
......
......@@ -7,7 +7,7 @@ ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
IF (Slicer3_USE_KWWIDGETS)
IF (Slicer_USE_KWWIDGETS)
# --------------------------------------------------------------------------
# Include dirs
......@@ -267,7 +267,7 @@ IF (Slicer3_USE_KWWIDGETS)
ADD_SUBDIRECTORY(Testing)
ENDIF(BUILD_TESTING)
ENDIF (Slicer3_USE_KWWIDGETS)
ENDIF (Slicer_USE_KWWIDGETS)
......
......@@ -128,7 +128,7 @@ SET(libs
)
TARGET_LINK_LIBRARIES(${lib_name} ${libs})
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
TARGET_LINK_LIBRARIES(${lib_name} ${KWWidgets_LIBRARIES})
ENDIF()
......
......@@ -65,7 +65,7 @@
#include "vtkMRMLSliceLogic.h"
// KWWidgets includes
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
# include "vtkKWTkUtilities.h"
# include "vtkKWApplication.h"
#endif
......@@ -780,14 +780,14 @@ void vtkSlicerApplicationLogic::CreateProcessingThread()
this->WriteDataQueueActive = true;
this->WriteDataQueueActiveLock->Unlock();
#if defined(Slicer3_USE_KWWIDGETS)
#if defined(Slicer_USE_KWWIDGETS)
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessModified");
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessReadData");
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessWriteData");
#endif //defined(Slicer3_USE_KWWIDGETS)
#endif //defined(Slicer_USE_KWWIDGETS)
}
}
......@@ -1150,7 +1150,7 @@ void vtkSlicerApplicationLogic::ProcessModified()
}
this->ModifiedQueueLock->Unlock();
#if defined(Slicer3_USE_KWWIDGETS)
#if defined(Slicer_USE_KWWIDGETS)
// if this is a string array, try to evaluate the entries in the interp
// - this allows threads to indirectly access the interpreter
vtkStringArray *stringArray = vtkStringArray::SafeDownCast( obj );
......@@ -1174,7 +1174,7 @@ void vtkSlicerApplicationLogic::ProcessModified()
}
}
}
#endif //defined(Slicer3_USE_KWWIDGETS)
#endif //defined(Slicer_USE_KWWIDGETS)
// Modify the object
// - decrement reference count that was increased when it was added to the queue
......@@ -1186,7 +1186,7 @@ void vtkSlicerApplicationLogic::ProcessModified()
}
}
#if defined(Slicer3_USE_KWWIDGETS)
#if defined(Slicer_USE_KWWIDGETS)
// schedule the next timer
if ((*this->InternalModifiedQueue).size() > 0)
{
......@@ -1200,7 +1200,7 @@ void vtkSlicerApplicationLogic::ProcessModified()
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessModified");
}
#endif //defined(Slicer3_USE_KWWIDGETS)
#endif //defined(Slicer_USE_KWWIDGETS)
}
void vtkSlicerApplicationLogic::ProcessReadData()
......@@ -1238,7 +1238,7 @@ void vtkSlicerApplicationLogic::ProcessReadData()
}
}
#if defined(Slicer3_USE_KWWIDGETS)
#if defined(Slicer_USE_KWWIDGETS)
// schedule the next timer
if ((*this->InternalReadDataQueue).size() > 0)
{
......@@ -1252,7 +1252,7 @@ void vtkSlicerApplicationLogic::ProcessReadData()
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessReadData");
}
#endif //defined(Slicer3_USE_KWWIDGETS)
#endif //defined(Slicer_USE_KWWIDGETS)
}
void vtkSlicerApplicationLogic::ProcessWriteData()
......@@ -1290,7 +1290,7 @@ void vtkSlicerApplicationLogic::ProcessWriteData()
}
}
#if defined(Slicer3_USE_KWWIDGETS)
#if defined(Slicer_USE_KWWIDGETS)
// schedule the next timer
if ((*this->InternalWriteDataQueue).size() > 0)
{
......@@ -1304,7 +1304,7 @@ void vtkSlicerApplicationLogic::ProcessWriteData()
vtkKWTkUtilities::CreateTimerHandler(vtkKWApplication::GetMainInterp(),
100, this, "ProcessWriteData");
}
#endif //defined(Slicer3_USE_KWWIDGETS)
#endif //defined(Slicer_USE_KWWIDGETS)
}
......
......@@ -25,7 +25,7 @@
#include "qSlicerCoreCommandOptions.h"
// Slicer includes
#include "vtkSlicerConfigure.h" // For Slicer3_USE_KWWIDGETS
#include "vtkSlicerConfigure.h" // For Slicer_USE_KWWIDGETS
#include "vtkSlicerApplicationLogic.h"
// MRML includes
......@@ -123,7 +123,7 @@ int qSlicerCoreApplicationTest1(int argc, char * argv [] )
return EXIT_FAILURE;
}
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
app.setModuleManager(0);
......@@ -147,7 +147,7 @@ int qSlicerCoreApplicationTest1(int argc, char * argv [] )
return EXIT_FAILURE;
}
#endif // Slicer3_USE_KWWIDGETS
#endif // Slicer_USE_KWWIDGETS
QString homeDirectory = app.slicerHome();
......@@ -167,7 +167,7 @@ int qSlicerCoreApplicationTest1(int argc, char * argv [] )
return EXIT_FAILURE;
}
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
vtkSmartPointer< vtkSlicerApplicationLogic > logic =
vtkSmartPointer< vtkSlicerApplicationLogic >::New();
......@@ -181,7 +181,7 @@ int qSlicerCoreApplicationTest1(int argc, char * argv [] )
std::cerr << "Error in setAppLogic()/appLogic() " << std::endl;
return EXIT_FAILURE;
}
#endif //Slicer3_USE_KWWIDGETS
#endif //Slicer_USE_KWWIDGETS
vtkMRMLScene * scene1 = app.mrmlScene();
......
......@@ -526,7 +526,7 @@ bool qSlicerCoreApplication::isInstalled()const
#endif
}
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
//-----------------------------------------------------------------------------
CTK_SET_CXX(qSlicerCoreApplication, bool, setInitialized, Initialized);
......@@ -541,7 +541,7 @@ void qSlicerCoreApplication::setModuleManager(qSlicerModuleManager* manager)
d->ModuleManager = QSharedPointer<qSlicerModuleManager>(manager);
}
#endif //Slicer3_USE_KWWIDGETS
#endif //Slicer_USE_KWWIDGETS
//-----------------------------------------------------------------------------
void qSlicerCoreApplication::setMRMLScene(vtkMRMLScene* newMRMLScene)
......
......@@ -27,7 +27,7 @@
// CTK includes
#include <ctkPimpl.h>
#include "vtkSlicerConfigure.h" // For Slicer3_USE_KWWIDGETS, Slicer_USE_PYTHONQT
#include "vtkSlicerConfigure.h" // For Slicer_USE_KWWIDGETS, Slicer_USE_PYTHONQT
#include "qSlicerBaseQTCoreExport.h"
......@@ -80,7 +80,7 @@ public:
/// moved as a protected member.
void setMRMLScene(vtkMRMLScene * scene);
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
///
/// Convenient method allowing to set the initialized flag
......@@ -102,7 +102,7 @@ public:
/// removed once the QT GUI is functional.
void setModuleManager(qSlicerModuleManager* moduleManager);
#endif //Slicer3_USE_KWWIDGETS
#endif //Slicer_USE_KWWIDGETS
/// Get application logic
vtkSlicerApplicationLogic* appLogic() const;
......
......@@ -293,7 +293,7 @@ bool qSlicerDataDialog::exec(const qSlicerIO::IOProperties& readerProperties)
{
Q_D(qSlicerDataDialog);
Q_ASSERT(!readerProperties.contains("fileName"));
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
d->setWindowFlags(d->windowFlags() | Qt::WindowStaysOnTopHint);
#endif
bool res = false;
......
......@@ -133,7 +133,7 @@ bool qSlicerStandardFileDialog::exec(const qSlicerIO::IOProperties& ioProperties
Q_ASSERT(!ioProperties.contains("fileName"));
qSlicerIOManager* ioManager = qSlicerApplication::application()->ioManager();
ctkFileDialog fileDialog(qobject_cast<QWidget*>(this->parent()));
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
fileDialog.setWindowFlags(fileDialog.windowFlags() | Qt::WindowStaysOnTopHint);
#endif
fileDialog.setNameFilters(
......
......@@ -125,7 +125,7 @@ bool qSlicerModelsDialog::exec(const qSlicerIO::IOProperties& readerProperties)
{
Q_D(qSlicerModelsDialog);
Q_ASSERT(!readerProperties.contains("fileName"));
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
d->setWindowFlags(d->windowFlags() | Qt::WindowStaysOnTopHint);
#endif
bool res = false;
......
......@@ -724,7 +724,7 @@ bool qSlicerSaveDataDialog::exec(const qSlicerIO::IOProperties& readerProperties
{
Q_D(qSlicerSaveDataDialog);
Q_ASSERT(!readerProperties.contains("fileName"));
#ifdef Slicer3_USE_KWWIDGETS
#ifdef Slicer_USE_KWWIDGETS
d->setWindowFlags(d->windowFlags() | Qt::WindowStaysOnTopHint);
#endif
d->setMRMLScene(qSlicerCoreApplication::application()->mrmlScene());
......
......@@ -119,7 +119,7 @@ endmacro(slicer3_enable_plugins_testing)
#-----------------------------------------------------------------------------
# Test a plugin
#
IF (Slicer3_USE_KWWIDGETS)
IF (Slicer_USE_KWWIDGETS)
include("${KWWidgets_CMAKE_DIR}/KWWidgetsTestingMacros.cmake")
macro(slicer3_add_plugins_test test_name clp_to_test)
set(build_type ".")
......@@ -132,4 +132,4 @@ IF (Slicer3_USE_KWWIDGETS)
endif(WIN32 AND CMAKE_CONFIGURATION_TYPES)
add_test(${test_name} ${Slicer3_DIR}/Slicer3 --launch ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${clp_to_test} ${ARGN})
endmacro(slicer3_add_plugins_test)
ENDIF (Slicer3_USE_KWWIDGETS)
ENDIF (Slicer_USE_KWWIDGETS)
......@@ -211,11 +211,11 @@ ENDIF()
#-----------------------------------------------------------------------------
# By default, build without KWWidget (TODO: eliminate this option for slicer4)
#
option(Slicer3_USE_KWWIDGETS "Build Slicer3 with KWWidgets." OFF)
option(Slicer_USE_KWWIDGETS "Build Slicer3 with KWWidgets." OFF)
#-----------------------------------------------------------------------------
# Since modules are KWWidgets based, unset there variables
IF(NOT Slicer3_USE_KWWIDGETS)
IF(NOT Slicer_USE_KWWIDGETS)
# Since the module Logic is shared between QTModules and regular Modules,
# the associated BIN, LIB and INCLUDE directory shouldn't be unset
#UNSET(Slicer_INSTALL_MODULES_BIN_DIR)
......@@ -234,7 +234,7 @@ ENDIF()
# preventing people from using the same compiler but with a different generator,
# or just the same compiler installed in a non-standard location.
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
set(SKIP_KWWidgets_BUILD_SETTINGS_FILE 1)
ENDIF()
set(SKIP_VTK_BUILD_SETTINGS_FILE 1)
......@@ -280,7 +280,7 @@ IF(Slicer_USE_QT)
ENDIF()
#-----------------------------------------------------------------------------
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
## KWWidgets
FIND_PACKAGE(KWWidgets REQUIRED)
IF(NOT KWWidgets_FOUND)
......@@ -316,17 +316,17 @@ mark_as_advanced(Slicer3_USE_VTK_CVSHEAD)
SLICER_SETUP_QT()
#-----------------------------------------------------------------------------
# Alert the user if both Slicer_USE_QT and Slicer3_USE_KWWIDGETS are OFF
IF(NOT Slicer_USE_QT AND NOT Slicer3_USE_KWWIDGETS)
MESSAGE(FATAL_ERROR "Both Slicer_USE_QT and Slicer3_USE_KWWIDGETS are OFF. Please, choose one")
# Alert the user if both Slicer_USE_QT and Slicer_USE_KWWIDGETS are OFF
IF(NOT Slicer_USE_QT AND NOT Slicer_USE_KWWIDGETS)
MESSAGE(FATAL_ERROR "Both Slicer_USE_QT and Slicer_USE_KWWIDGETS are OFF. Please, choose one")
ENDIF()
#-----------------------------------------------------------------------------
# If Slicer_USE_QT is ON and Slicer3_USE_KWWIDGETS is OFF, complain if VTK_WRAP_TCL is ON
# If Slicer_USE_QT is ON and Slicer_USE_KWWIDGETS is OFF, complain if VTK_WRAP_TCL is ON
# Note: Later on we will expect VTK_WRAP_PYTHON to be ON
IF(Slicer_USE_QT AND NOT Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_QT AND NOT Slicer_USE_KWWIDGETS)
IF(VTK_WRAP_TCL)
MESSAGE(FATAL_ERROR "For now, if Slicer_USE_QT is ON and Slicer3_USE_KWWIDGETS is OFF, we expect VTK_WRAP_TCL to be OFF")
MESSAGE(FATAL_ERROR "For now, if Slicer_USE_QT is ON and Slicer_USE_KWWIDGETS is OFF, we expect VTK_WRAP_TCL to be OFF")
ENDIF()
ENDIF()
......@@ -414,7 +414,7 @@ IF(VTK_WRAP_TCL)
VTK_GET_TCL_TK_VERSION(TCL_TK_MAJOR_VERSION TCL_TK_MINOR_VERSION)
set(TCL_TK_VERSION_DOT "${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}")
set(TCL_TK_VERSION "${TCL_TK_MAJOR_VERSION}${TCL_TK_MINOR_VERSION}")
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
include("${KWWidgets_CMAKE_DIR}/KWWidgetsTclTkMacros.cmake")
incr_tcl_get_version(INCR_TCL_MAJOR_VERSION INCR_TCL_MINOR_VERSION)
set(INCR_TCL_VERSION_DOT "${INCR_TCL_MAJOR_VERSION}.${INCR_TCL_MINOR_VERSION}")
......@@ -437,7 +437,7 @@ ENDIF()
# Generate some useful scripts that can be used to setup various environment
# variables and launch the executable properly against external packages.
#
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
include("${KWWidgets_CMAKE_DIR}/KWWidgetsPathsMacros.cmake")
set(extra_dirs
"${Teem_DIR}/bin"
......@@ -461,7 +461,7 @@ ENDIF()
# INCLUDE("${KWWidgets_CMAKE_DIR}/KWWidgetsWrappingMacros.cmake")
# KWWidgets_WRAP_TCL(${LIB_NAME} LIB_TCL_SRCS "${LIB_SRCS}" "")
#
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
IF(NOT VTK_CMAKE_DIR)
set(VTK_CMAKE_DIR "${VTK_SOURCE_DIR}/CMake")
ENDIF()
......@@ -471,7 +471,7 @@ ENDIF()
#-----------------------------------------------------------------------------
# Check versions of VTK to track CVS HEAD
#
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
find_package(VTK REQUIRED)
IF(EXISTS ${VTK_CMAKE_DIR}/VTKVersionMacros.cmake)
include(${VTK_CMAKE_DIR}/VTKVersionMacros.cmake)
......@@ -640,7 +640,7 @@ slicer3_get_persistent_property(Slicer3_Base_INCLUDE_DIRS Slicer3_Base_INCLUDE_D
INCLUDE("${Slicer_CMAKE_DIR}/SlicerModuleLogicMacros.cmake")
IF(NOT Slicer3_USE_KWWIDGETS)
IF(NOT Slicer_USE_KWWIDGETS)
# KWWidgets and Qt modules share the same logics typically located in the
# kwwdigets modules. When KWWidgets is not build, the logic are missing for Qt
# we need to manually add them:
......@@ -664,13 +664,13 @@ ENDIF()
# Modules and CLI
#
option(Slicer_BUILD_CLI "Build Slicer3 CLI Plugins" ON)
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
option(Slicer3_BUILD_MODULES "Build Slicer3 Modules" ON)
ENDIF()
include("${Slicer_CMAKE_DIR}/Slicer3PluginsMacros.cmake")
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
include("${Slicer_CMAKE_DIR}/Slicer3ModulesMacros.cmake")
IF(Slicer3_BUILD_MODULES)
......@@ -687,7 +687,7 @@ ENDIF()
#-----------------------------------------------------------------------------
# Module EMSegment libraries
# The EMSegment{Registration,Graph,Algorithm,MRML} libraries are built from the top-level
# CMakeLists.txt. Doing so allow to build these libraries also if Slicer3_USE_KWWIDGETS is OFF
# CMakeLists.txt. Doing so allow to build these libraries also if Slicer_USE_KWWIDGETS is OFF
IF(Slicer3_BUILD_MODULES OR Slicer_BUILD_QTLOADABLEMODULES)
include("${Slicer_CMAKE_DIR}/Slicer3ModulesMacros.cmake")
......@@ -700,7 +700,7 @@ ENDIF()
# Since EMSegment module expects Volume module and its associated library to be
# built beforehand,let's enfore that by building EMSegment here.
# Note that EMSegment has been commented in Modules/CMakeLists.txt
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
IF(Slicer3_BUILD_MODULES)
ADD_SUBDIRECTORY(Modules/EMSegment)
ENDIF()
......
......@@ -32,9 +32,9 @@ SET(Slicer3_Base_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin)
SET(ITK_DIR_CONFIG ${ITK_DIR})
SET(VTK_DIR_CONFIG ${VTK_DIR})
IF (Slicer3_USE_KWWIDGETS)
IF (Slicer_USE_KWWIDGETS)
SET(KWWidgets_DIR_CONFIG ${KWWidgets_DIR})
ENDIF (Slicer3_USE_KWWIDGETS)
ENDIF (Slicer_USE_KWWIDGETS)
SET(Teem_DIR_CONFIG ${Teem_DIR})
SET(PYTHON_INCLUDE_PATH_CONFIG ${PYTHON_INCLUDE_PATH})
SET(PYTHON_LIBRARIES_CONFIG ${PYTHON_LIBRARIES})
......
......@@ -10,11 +10,11 @@ set(dirs
# FileWatcher
)
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
SET(dirs ${dirs}
LoadableModule
)
ENDIF(Slicer3_USE_KWWIDGETS)
ENDIF(Slicer_USE_KWWIDGETS)
# Note: Order of of SUBDIRS is important if your projects depend
# on code in other projects (put dependent project later).
......@@ -32,13 +32,13 @@ SET(dirs ${dirs}
MRMLDisplayableManager
)
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
SET(dirs ${dirs}
GenerateLM
SlicerIO
ITKCommandIO
)
ENDIF(Slicer3_USE_KWWIDGETS)
ENDIF(Slicer_USE_KWWIDGETS)
SET(dirs ${dirs}
MRMLIDImageIO
......@@ -106,9 +106,9 @@ slicer3_set_persistent_property(Slicer3_Libs_INCLUDE_DIRS ${tmp} ${include_dirs}
# Inconsistent library name vs. project/dir name :(
string(REPLACE ITKCommandIO CommandIO libs "${libs}")
IF(Slicer3_USE_KWWIDGETS)
IF(Slicer_USE_KWWIDGETS)
string(REPLACE SlicerIO slicerio libs "${libs}")
ENDIF(Slicer3_USE_KWWIDGETS)
ENDIF(Slicer_USE_KWWIDGETS)
string(REPLACE MGHImageIO MGHIO libs "${libs}")
string(REPLACE MRMLIDImageIO MRMLIDIO libs "${libs}")
......
......@@ -162,7 +162,7 @@ endif()
# | Linux{32,64} | OK | OK | OK |
# ----------------------------------------------------
# ----------------------------------------------------
# | Slicer3_USE_KWWIDGETS | ON | ON | OFF |
# | Slicer_USE_KWWIDGETS | ON | ON | OFF |
# |---------------------------------------------------
# | Slicer_USE_QT | OFF | ON | ON |
# |--------------------------------------------------|
......@@ -172,24 +172,24 @@ endif()
# |---------------------------------------------------
#
# Case 1: [Slicer3_USE_KWWIDGETS: ON, Slicer_USE_QT: OFF, VTK_WRAP_TCL:ON]
# Case 1: [Slicer_USE_KWWIDGETS: ON, Slicer_USE_QT: OFF, VTK_WRAP_TCL:ON]
# a) KwwOnly-NoPython
# b) KwwOnly-Python
#
# Case 2: [Slicer3_USE_KWWIDGETS: ON, Slicer_USE_QT: ON, VTK_WRAP_TCL:ON]
# Case 2: [Slicer_USE_KWWIDGETS: ON, Slicer_USE_QT: ON, VTK_WRAP_TCL:ON]
# a) KwwAndQt-NoPython-NoPythonQt
# b) KwwAndQt-Python
# c) KwwAndQt-PythonQt [VTK_WRAP_PYTHON: ON] -> NOT SUPPORTED
# d) KwwAndQt-Python-PythonQt -> NOT SUPPORTED
#
# Case 3: [Slicer3_USE_KWWIDGETS: OFF, Slicer_USE_QT: ON, VTK_WRAP_TCL:OFF]
# Case 3: [Slicer_USE_KWWIDGETS: OFF, Slicer_USE_QT: ON, VTK_WRAP_TCL:OFF]
# a) QtOnly-NoPythonQt
# b) QtOnly-PythonQt [VTK_WRAP_PYTHON: ON]
#
#
# Note:
# Tcl, Tk, and incrTcl are built in all cases
# blt and iwidgets are build only if Slicer3_USE_KWWIDGETS is ON
# blt and iwidgets are build only if Slicer_USE_KWWIDGETS is ON
# Python is build if either Slicer_USE_PYTHON or Slicer_USE_PYTHONQT are ON
#
......@@ -198,7 +198,7 @@ endif()
#------------------------------------------------------------------------------
# KWWidgets off by default.
option(Slicer3_USE_KWWIDGETS "Build Slicer3 KWWidgets GUI" OFF)
option(Slicer_USE_KWWIDGETS "Build Slicer3 KWWidgets GUI" OFF)
#------------------------------------------------------------------------------
......@@ -286,13 +286,13 @@ option(Slicer_BUILD_CLI "Build Slicer3 CLI Plugins" ON)
# Validate options
#------------------------------------------------------------------------------
if (NOT Slicer3_USE_KWWIDGETS AND NOT Slicer_USE_QT)
set(err "error: Slicer SuperBuild requires at least Slicer3_USE_KWWIDGETS or Slicer_USE_QT to be ON.
if (NOT Slicer_USE_KWWIDGETS AND NOT Slicer_USE_QT)
set(err "error: Slicer SuperBuild requires at least Slicer_USE_KWWIDGETS or Slicer_USE_QT to be ON.
Slicer3_USE_KWWIDGETS = ON
Slicer_USE_KWWIDGETS = ON
-> Means Slicer will be built only with KWWidgets support.
Slicer3_USE_KWWIDGETS = ON and Slicer_USE_QT = ON
Slicer_USE_KWWIDGETS = ON and Slicer_USE_QT = ON
-> Means Slicer will be built with both KWWidgets and QT support. Note: NOT supported on Mac
Slicer_USE_QT = ON
......@@ -307,13 +307,13 @@ if (Slicer_USE_PYTHON AND Slicer_USE_PYTHONQT)
message(FATAL_ERROR "${err}")
endif()
if (Slicer3_USE_KWWIDGETS AND Slicer_USE_PYTHONQT)
set(err "error: Slicer SuperBuild doesn't support Slicer3_USE_KWWIDGETS and Slicer_USE_PYTHONQT ON.")
if (Slicer_USE_KWWIDGETS AND Slicer_USE_PYTHONQT)
set(err "error: Slicer SuperBuild doesn't support Slicer_USE_KWWIDGETS and Slicer_USE_PYTHONQT ON.")
message(FATAL_ERROR "${err}")
endif()
if (Slicer3_USE_KWWIDGETS AND Slicer_USE_QT AND APPLE)
set(err "error: Slicer SuperBuild on Mac doesn't support Slicer3_USE_KWWIDGETS and Slicer_USE_QT ON")
if (Slicer_USE_KWWIDGETS AND Slicer_USE_QT AND APPLE)
set(err "error: Slicer SuperBuild on Mac doesn't support Slicer_USE_KWWIDGETS and Slicer_USE_QT ON")
message(FATAL_ERROR "${err}")
endif()
......@@ -336,7 +336,7 @@ set(incrTcl_DEPENDENCIES tcl tk)
set(iwidgets_DEPENDENCIES tcl itcl)
set(blt_DEPENDENCIES tcl tk)
set(python_DEPENDENCIES)
if(Slicer3_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
if(Slicer_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
if(WIN32)
set(python_DEPENDENCIES tcl)
else()
......@@ -366,12 +366,12 @@ set(slicer_DEPENDENCIES VTK Insight BatchMake OpenIGTLink teem cmcurl)
# Conditionnaly include ExternalProject Target
#------------------------------------------------------------------------------
if(Slicer3_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
if(Slicer_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
include(External_Tcl)
include(External_Tk)
include(External_incrTcl)
endif()
if(Slicer3_USE_KWWIDGETS)
if(Slicer_USE_KWWIDGETS)
include(External_iwidgets)
include(External_blt)
endif()
......@@ -397,7 +397,7 @@ if(Slicer_USE_QT)
endif()
endif()
if(Slicer3_USE_KWWIDGETS)
if(Slicer_USE_KWWIDGETS)
include(External_KWWidgets)
endif()
......@@ -411,8 +411,8 @@ include(External_cmcurl)
# Update external project dependencies
#------------------------------------------------------------------------------
# For now, tk and itcl are used only when Slicer3_USE_KWWIDGETS is ON
if(Slicer3_USE_KWWIDGETS)
# For now, tk and itcl are used only when Slicer_USE_KWWIDGETS is ON
if(Slicer_USE_KWWIDGETS)
if(WIN32)
list(APPEND slicer_DEPENDENCIES tcl KWWidgets)
else()
......@@ -516,7 +516,7 @@ ExternalProject_Add(${proj}
-DSlicer_USE_CTKAPPLAUNCHER:BOOL=${Slicer_USE_CTKAPPLAUNCHER}
-DCTKAPPLAUNCHER_DIR:PATH=${CTKAPPLAUNCHER_DIR}
# KWWidgets
-DSlicer3_USE_KWWIDGETS:BOOL=${Slicer3_USE_KWWIDGETS}
-DSlicer_USE_KWWIDGETS:BOOL=${Slicer_USE_KWWIDGETS}
-DKWWidgets_DIR:PATH=${CMAKE_BINARY_DIR}/KWWidgets-build
INSTALL_COMMAND ""
)
......@@ -16,7 +16,7 @@ if(WIN32)
# point the tkinter build file to the slicer tcl-build
set(python_PATCH_COMMAND)
if(Slicer3_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
if(Slicer_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
set(python_tkinter ${python_base}/pyproject.vsprops)
string(REPLACE "/" "\\" python_tkinter ${python_tkinter})
......@@ -44,7 +44,7 @@ if(WIN32)
${python_DEPENDENCIES}
)
if(Slicer3_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
if(Slicer_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)
# this must match the version of tcl we are building for slicer.
ExternalProject_Add_Step(${proj} Patch_tcltk_version
COMMAND ${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind=85 -Dreplace=84 -P ${script}
......@@ -68,7 +68,7 @@ if(WIN32)
build_python_target(pythoncore Build_w9xpopen)
build_python_target(_socket Build_pythoncore)
if(Slicer3_USE_KWWIDGETS OR Slicer_USE_PYTHONQT_WITH_TCL)