Commit 890f7df2 authored by jcfr's avatar jcfr
Browse files

COMP: Remove occurences of Slicer_USE_QT variable

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16353 3bd1e089-480b-0410-8dfb-8563597acbee
parent 5bdef023
......@@ -4,9 +4,7 @@ IF(Slicer_BUILD_CLI)
ADD_SUBDIRECTORY(CLI)
ENDIF(Slicer_BUILD_CLI)
IF(Slicer_USE_QT)
ADD_SUBDIRECTORY(SlicerQT)
ENDIF(Slicer_USE_QT)
ADD_SUBDIRECTORY(SlicerQT)
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(Testing)
......
......@@ -41,14 +41,10 @@ INCLUDE_DIRECTORIES(
)
ADD_SUBDIRECTORY(Logic)
IF(Slicer_USE_QT)
ADD_SUBDIRECTORY(QTCore)
ADD_SUBDIRECTORY(QTGUI)
ADD_SUBDIRECTORY(QTCLI)
ADD_SUBDIRECTORY(QTCoreModules)
ENDIF(Slicer_USE_QT)
ADD_SUBDIRECTORY(QTCore)
ADD_SUBDIRECTORY(QTGUI)
ADD_SUBDIRECTORY(QTCLI)
ADD_SUBDIRECTORY(QTCoreModules)
ADD_SUBDIRECTORY(GUI)
ADD_SUBDIRECTORY(CLI)
......
......@@ -386,9 +386,7 @@ void vtkSlicerApplicationLogic::ProcessMRMLEvents(vtkObject * /*caller*/,
unsigned long /*event*/,
void * /*callData*/ )
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::ProcessMRMLEvents is deprecated");
#endif
//
// Look for a selection node in the scene
......@@ -511,9 +509,7 @@ void vtkSlicerApplicationLogic::PrintSelf(ostream& os, vtkIndent indent)
//----------------------------------------------------------------------------
void vtkSlicerApplicationLogic::Connect (const char *URL)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::Connect is deprecated");
#endif
if (this->GetMRMLScene())
{
......@@ -525,9 +521,7 @@ void vtkSlicerApplicationLogic::Connect (const char *URL)
//----------------------------------------------------------------------------
int vtkSlicerApplicationLogic::Commit()
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::Commit is deprecated");
#endif
if (this->GetMRMLScene())
{
return (this->GetMRMLScene()->Commit());
......@@ -538,9 +532,7 @@ int vtkSlicerApplicationLogic::Commit()
//----------------------------------------------------------------------------
int vtkSlicerApplicationLogic::Commit(const char *URL)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::Commit is deprecated");
#endif
if (this->GetMRMLScene())
{
return (this->GetMRMLScene()->Commit(URL));
......@@ -565,9 +557,7 @@ vtkCxxSetObjectMacro(vtkSlicerApplicationLogic, SelectionNode, vtkMRMLSelectionN
//----------------------------------------------------------------------------
vtkMRMLSelectionNode* vtkSlicerApplicationLogic::GetSelectionNode()
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::GetSelectionNode is deprecated");
#endif
vtkDebugMacro(<< this->GetClassName() << " (" << this
<< "): returning SelectionNode address " << this->SelectionNode );
return this->SelectionNode;
......@@ -579,9 +569,7 @@ vtkCxxSetObjectMacro(vtkSlicerApplicationLogic, InteractionNode, vtkMRMLInteract
//----------------------------------------------------------------------------
vtkMRMLInteractionNode* vtkSlicerApplicationLogic::GetInteractionNode()
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::GetInteractionNode is deprecated");
#endif
vtkDebugMacro(<< this->GetClassName() << " (" << this
<< "): returning InteractionNode address " << this->InteractionNode );
return this->InteractionNode;
......@@ -590,9 +578,7 @@ vtkMRMLInteractionNode* vtkSlicerApplicationLogic::GetInteractionNode()
//----------------------------------------------------------------------------
vtkMRMLSliceLogic* vtkSlicerApplicationLogic::GetSliceLogic(const char *layoutName)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::GetSliceLogic is deprecated");
#endif
if (this->InternalSliceLogicMap)
{
SliceLogicMap::const_iterator lend = (*this->InternalSliceLogicMap).end();
......@@ -611,9 +597,7 @@ vtkMRMLSliceLogic* vtkSlicerApplicationLogic::GetSliceLogic(const char *layoutNa
// this function can be further improved to check if this is a duplicate.
void vtkSlicerApplicationLogic::AddSliceLogic(const char *layoutName, vtkMRMLSliceLogic *sliceLogic)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::AddSliceLogic is deprecated");
#endif
if (this->InternalSliceLogicMap)
{
(*this->InternalSliceLogicMap)[layoutName] = sliceLogic;
......@@ -622,9 +606,7 @@ void vtkSlicerApplicationLogic::AddSliceLogic(const char *layoutName, vtkMRMLSli
void vtkSlicerApplicationLogic::AddSliceLogic(vtkMRMLSliceLogic *sliceLogic)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::AddSliceLogic is deprecated");
#endif
if (this->InternalSliceLogicMap)
{
(*this->InternalSliceLogicMap)[sliceLogic->GetName()] = sliceLogic;
......@@ -633,9 +615,7 @@ void vtkSlicerApplicationLogic::AddSliceLogic(vtkMRMLSliceLogic *sliceLogic)
void vtkSlicerApplicationLogic::RemoveSliceLogic(vtkMRMLSliceLogic *sliceLogic)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::RemoveSliceLogic is deprecated");
#endif
SliceLogicMap::iterator mit;
for (mit = (*this->InternalSliceLogicMap).begin();
mit != (*this->InternalSliceLogicMap).end(); ++mit)
......@@ -652,9 +632,7 @@ void vtkSlicerApplicationLogic::RemoveSliceLogic(vtkMRMLSliceLogic *sliceLogic)
void vtkSlicerApplicationLogic::RemoveSliceLogic(char *layoutName)
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::RemoveSliceLogic is deprecated");
#endif
SliceLogicMap::iterator mit;
mit = (*this->InternalSliceLogicMap).find(layoutName);
if (mit != (*this->InternalSliceLogicMap).end())
......@@ -668,9 +646,7 @@ void vtkSlicerApplicationLogic::RemoveSliceLogic(char *layoutName)
void vtkSlicerApplicationLogic::CreateSliceLogics()
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::CreateSliceLogics is deprecated");
#endif
// make sure there is a CrossHair in the scene
vtkMRMLCrosshairNode *crosshair = vtkMRMLCrosshairNode::New();
crosshair->SetCrosshairName("default");
......@@ -714,9 +690,7 @@ void vtkSlicerApplicationLogic::CreateSliceLogics()
//----------------------------------------------------------------------------
void vtkSlicerApplicationLogic::DeleteSliceLogics()
{
#ifdef Slicer_USE_QT
vtkWarningMacro(<< "SlicerQt - vtkSlicerApplicationLogic::DeleteSliceLogics is deprecated");
#endif
if (this->InternalSliceLogicMap)
{
vtkMRMLSliceLogic *sliceLogic;
......
......@@ -160,9 +160,6 @@ MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY)
SET(Slicer_ITK_GIT_TAG "origin/slicer-4.0" CACHE STRING "ITK git tag to use")
MARK_AS_ADVANCED(Slicer_ITK_GIT_TAG)
# Slicer implicitly uses Qt
SET(Slicer_USE_QT ON CACHE INTERNAL "Build Slicer with Qt")
#-----------------------------------------------------------------------------
# Documentation
#-----------------------------------------------------------------------------
......@@ -417,52 +414,46 @@ INCLUDE(${VTK_USE_FILE})
#-----------------------------------------------------------------------------
# Qt
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
# Module name should be specified as they appear in FindQt4.cmake
# For example, the module name associated with the variable QT_USE_QTXML is XML.
SET(Slicer_REQUIRED_QT_MODULES CORE GUI NETWORK)
IF(BUILD_TESTING)
LIST(APPEND Slicer_REQUIRED_QT_MODULES TEST)
ENDIF()
INCLUDE(SlicerFindQtAndCheckVersion)
# Module name should be specified as they appear in FindQt4.cmake
# For example, the module name associated with the variable QT_USE_QTXML is XML.
SET(Slicer_REQUIRED_QT_MODULES CORE GUI NETWORK)
IF(BUILD_TESTING)
LIST(APPEND Slicer_REQUIRED_QT_MODULES TEST)
ENDIF()
INCLUDE(SlicerFindQtAndCheckVersion)
#-----------------------------------------------------------------------------
# CTK
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
FIND_PACKAGE(CTK REQUIRED)
INCLUDE(${CTK_USE_FILE})
# Update CMake module path
SET(CMAKE_MODULE_PATH
${VTK_CMAKE_DIR}
${CTK_CMAKE_DIR}
${CMAKE_MODULE_PATH}
${CTK_CMAKE_UTILITIES_DIR})
ENDIF()
FIND_PACKAGE(CTK REQUIRED)
INCLUDE(${CTK_USE_FILE})
# Update CMake module path
SET(CMAKE_MODULE_PATH
${VTK_CMAKE_DIR}
${CTK_CMAKE_DIR}
${CMAKE_MODULE_PATH}
${CTK_CMAKE_UTILITIES_DIR})
#-----------------------------------------------------------------------------
# PythonQt
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
IF(Slicer_USE_PYTHONQT)
IF(NOT VTK_WRAP_PYTHON)
MESSAGE(FATAL_ERROR "Since both Slicer_USE_QT and Slicer_USE_PYTHONQT are ON, VTK_WRAP_PYTHON is expected to be ON. Disable Slicer_USE_PYTHONQT or re-configure VTK with python wrapping.")
ENDIF()
IF(Slicer_USE_PYTHONQT)
IF(NOT VTK_WRAP_PYTHON)
MESSAGE(FATAL_ERROR "Since Slicer_USE_PYTHONQT is ON, VTK_WRAP_PYTHON is expected to be ON. Re-configure VTK with python wrapping.")
ENDIF()
INCLUDE(vtkMacroKitPythonWrap)
INCLUDE(vtkMacroKitPythonWrap)
SET(PYTHONQT_INSTALL_DIR ${CTK_PYTHONQT_INSTALL_DIR})
LINK_DIRECTORIES(${PYTHONQT_INSTALL_DIR}/lib)
INCLUDE(ctkMacroWrapPythonQt)
INCLUDE(ctkMacroCompilePythonScript)
# Enable qMRMLWidgets python wrapping
SET(qMRMLWidgets_WRAP_PYTHON ON)
ENDIF()
SET(PYTHONQT_INSTALL_DIR ${CTK_PYTHONQT_INSTALL_DIR})
LINK_DIRECTORIES(${PYTHONQT_INSTALL_DIR}/lib)
INCLUDE(ctkMacroWrapPythonQt)
INCLUDE(ctkMacroCompilePythonScript)
# Enable qMRMLWidgets python wrapping
SET(qMRMLWidgets_WRAP_PYTHON ON)
ENDIF()
#-----------------------------------------------------------------------------
......@@ -549,19 +540,17 @@ SET(vtkITK_DIR ${Slicer_BINARY_DIR}/Libs/vtkITK)
#-----------------------------------------------------------------------------
# Qt Loadable and Scripted Modules
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTLoadableModules")
ENDIF()
IF(Slicer_BUILD_QTSCRIPTEDMODULES)
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTScriptedModules")
ENDIF()
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTLoadableModules")
ENDIF()
IF(Slicer_BUILD_QTSCRIPTEDMODULES)
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTScriptedModules")
ENDIF()
# --------------------------------------------------------------------------
......@@ -677,11 +666,11 @@ ENDFOREACH()
# Qt Loadable Modules
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT AND Slicer_BUILD_QTLOADABLEMODULES)
IF(Slicer_BUILD_QTLOADABLEMODULES)
ADD_SUBDIRECTORY(QTModules)
ENDIF()
IF(Slicer_USE_PYTHONQT AND Slicer_BUILD_QTSCRIPTEDMODULES)
IF(Slicer_BUILD_QTSCRIPTEDMODULES)
ADD_SUBDIRECTORY(QTScriptedModules)
ENDIF()
......@@ -715,21 +704,17 @@ INSTALL(DIRECTORY
# let's build the launcher for Kww, KwwAndQt and also QtOnly slicer ...
ADD_SUBDIRECTORY(Utilities/Launcher)
IF(Slicer_USE_QT)
# on Mac we need to include the path of each Qt Framework in DYLD_LIBRARY_PATH in the launcher.
IF(APPLE)
SET (QTLIBLIST QTCORE QTGUI QTNETWORK QTXML QTTEST QTSQL QTOPENGL QTWEBKIT PHONON QTXMLPATTERNS)
FOREACH(qtlib ${QTLIBLIST})
IF(QT_${qtlib}_LIBRARY_RELEASE AND APPLE)
GET_FILENAME_COMPONENT(QT_FRAMEWORK_NAME_tmp ${QT_${qtlib}_LIBRARY_RELEASE} NAME)
SET(Slicer_QT_FRAMEWORK_DIRS "lib/Qt/${QT_FRAMEWORK_NAME_tmp}/Versions/4:${Slicer_QT_FRAMEWORK_DIRS}")
ENDIF()
ENDFOREACH()
ENDIF()
# on Mac we need to include the path of each Qt Framework in DYLD_LIBRARY_PATH in the launcher.
IF(APPLE)
SET (QTLIBLIST QTCORE QTGUI QTNETWORK QTXML QTTEST QTSQL QTOPENGL QTWEBKIT PHONON QTXMLPATTERNS)
ENDIF(Slicer_USE_QT)
FOREACH(qtlib ${QTLIBLIST})
IF(QT_${qtlib}_LIBRARY_RELEASE AND APPLE)
GET_FILENAME_COMPONENT(QT_FRAMEWORK_NAME_tmp ${QT_${qtlib}_LIBRARY_RELEASE} NAME)
SET(Slicer_QT_FRAMEWORK_DIRS "lib/Qt/${QT_FRAMEWORK_NAME_tmp}/Versions/4:${Slicer_QT_FRAMEWORK_DIRS}")
ENDIF()
ENDFOREACH()
ENDIF()
CONFIGURE_FILE(
${Slicer_SOURCE_DIR}/launch.tcl.in
......@@ -743,10 +728,7 @@ INSTALL(
#-----------------------------------------------------------------------------
# Launcher for QTDesigner
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
ADD_SUBDIRECTORY(Utilities/Designer)
ENDIF()
ADD_SUBDIRECTORY(Utilities/Designer)
#-----------------------------------------------------------------------------
# Package slicer
......
......@@ -20,23 +20,14 @@ LIST(APPEND dirs
MRMLCLI
MRMLLogic
MRMLDisplayableManager
)
LIST(APPEND dirs
MRMLIDImageIO
MGHImageIO
IGT
RemoteIO
#SIGN
qMRMLWidgets
)
#-----------------------------------------------------------------------------
# QT libraries
#-----------------------------------------------------------------------------
IF(Slicer_USE_QT)
LIST(APPEND dirs qMRMLWidgets)
ENDIF()
#-----------------------------------------------------------------------------
# CUDA
#-----------------------------------------------------------------------------
......
......@@ -19,9 +19,7 @@ set(Slicer_VERSION_PATCH "@Slicer_VERSION_PATCH@")
# Whether Slicer was built with modules and CLI support.
set(Slicer_BUILD_CLI "@Slicer_BUILD_CLI@")
IF(Slicer_USE_QT)
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
ENDIF(Slicer_USE_QT)
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
# Whether Slicer was built with shared libraries.
set(Slicer_BUILD_SHARED "@BUILD_SHARED_LIBS@")
......@@ -83,16 +81,14 @@ set(Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_INSTALL_PLUGINS_INCLUDE_DIR@")
set(Slicer_INSTALL_PLUGINS_SHARE_DIR "@Slicer_INSTALL_PLUGINS_SHARE_DIR@")
set(Slicer_INSTALL_PLUGINS_CACHE_DIR "@Slicer_INSTALL_PLUGINS_CACHE_DIR@")
set(Slicer_USE_QT "@Slicer_USE_QT@")
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
IF(Slicer_USE_QT AND Slicer_BUILD_QTLOADABLEMODULES)
IF(Slicer_BUILD_QTLOADABLEMODULES)
set(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR@")
ENDIF(Slicer_USE_QT AND Slicer_BUILD_QTLOADABLEMODULES)
ENDIF()
# The Slicer install prefix (*not* defined in the install tree)
set(Slicer_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
......
......@@ -19,9 +19,7 @@ set(Slicer_VERSION_PATCH "@Slicer_VERSION_PATCH@")
# Whether Slicer was built with modules and CLI support.
set(Slicer_BUILD_CLI "@Slicer_BUILD_CLI@")
IF(Slicer_USE_QT)
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
ENDIF(Slicer_USE_QT)
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
# Whether Slicer was built with shared libraries.
set(Slicer_BUILD_SHARED "@BUILD_SHARED_LIBS@")
......@@ -128,12 +126,12 @@ set(Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_INSTALL_PLUGINS_INCLUDE_DIR@")
set(Slicer_INSTALL_PLUGINS_SHARE_DIR "@Slicer_INSTALL_PLUGINS_SHARE_DIR@")
set(Slicer_INSTALL_PLUGINS_CACHE_DIR "@Slicer_INSTALL_PLUGINS_CACHE_DIR@")
IF(Slicer_USE_QT AND Slicer_BUILD_QTLOADABLEMODULES)
IF(Slicer_BUILD_QTLOADABLEMODULES)
set(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR@")
set(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR@")
ENDIF(Slicer_USE_QT AND Slicer_BUILD_QTLOADABLEMODULES)
ENDIF()
# Components needed to build modules from outside a Slicer build tree or
# from outside a Slicer installation tree
......
......@@ -135,21 +135,15 @@ endif()
include(SuperBuild/External_VTK.cmake)
include(SuperBuild/External_Insight.cmake)
if(Slicer_USE_QT)
include(SuperBuild/External_CTK.cmake)
if (Slicer_USE_CTKAPPLAUNCHER)
include(SuperBuild/External_CTKAPPLAUNCHER.cmake)
endif()
include(SuperBuild/External_CTK.cmake)
if (Slicer_USE_CTKAPPLAUNCHER)
include(SuperBuild/External_CTKAPPLAUNCHER.cmake)
endif()
include(SuperBuild/External_teem.cmake)
include(SuperBuild/External_OpenIGTLink.cmake)
if(Slicer_USE_BatchMake)
include(SuperBuild/External_BatchMake.cmake)
endif()
include(SuperBuild/External_cmcurl.cmake)
include(SuperBuild/External_libarchive.cmake)
......@@ -163,11 +157,9 @@ if (Slicer_USE_PYTHONQT_WITH_TCL)
endif()
endif()
if(Slicer_USE_QT)
list(APPEND slicer_DEPENDENCIES CTK)
if (Slicer_USE_CTKAPPLAUNCHER)
list(APPEND slicer_DEPENDENCIES CTKAPPLAUNCHER)
endif()
list(APPEND slicer_DEPENDENCIES CTK)
if (Slicer_USE_CTKAPPLAUNCHER)
list(APPEND slicer_DEPENDENCIES CTKAPPLAUNCHER)
endif()
if(Slicer_USE_PYTHONQT)
......@@ -208,7 +200,6 @@ SET(slicer_cmake_boolean_args
WITH_MEMCHECK
Slicer_BUILD_CLI
Slicer_BUILD_QTLOADABLEMODULES
Slicer_USE_QT
Slicer_USE_PYTHONQT
Slicer_USE_PYTHONQT_WITH_TCL
Slicer_USE_CTKAPPLAUNCHER
......
#-----------------------------------------------------------------------------
# Get and build CTK
if (Slicer_USE_QT)
# Sanity checks
if(DEFINED CTK_DIR AND NOT EXISTS ${CTK_DIR})
message(FATAL_ERROR "CTK_DIR variable is defined but corresponds to non-existing directory")
endif()
set(proj CTK)
if(NOT DEFINED CTK_DIR)
# Sanity checks
if(DEFINED CTK_DIR AND NOT EXISTS ${CTK_DIR})
message(FATAL_ERROR "CTK_DIR variable is defined but corresponds to non-existing directory")
endif()
set(proj CTK)
if(NOT DEFINED CTK_DIR)
# message(STATUS "Adding project:${proj}")
ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
GIT_TAG "origin/master"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
${ep_common_args}
-DADDITIONAL_CXX_FLAGS=${ep_common_cxx_flags}
-DADDITIONAL_C_FLAGS=${ep_common_c_flags}
-DCTK_INSTALL_LIB_DIR:STRING=${Slicer_INSTALL_LIB_DIR}
-DCTK_USE_GIT_PROTOCOL:BOOL=${Slicer_USE_GIT_PROTOCOL}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DVTK_DIR:PATH=${VTK_DIR}
-DITK_DIR:PATH=${ITK_DIR}
-DPYTHON_LIBRARY:FILEPATH=${slicer_PYTHON_LIBRARY}
-DPYTHON_INCLUDE_DIR:PATH=${slicer_PYTHON_INCLUDE}
-DPYTHON_EXECUTABLE:FILEPATH=${slicer_PYTHON_EXECUTABLE}
-DCTK_LIB_Widgets:BOOL=ON
-DCTK_LIB_Visualization/VTK/Widgets:BOOL=ON
-DCTK_LIB_ImageProcessing/ITK/Core:BOOL=ON
-DCTK_LIB_Scripting/Python/Core:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTUITOOLS:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Widgets:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_WRAP_PYTHONQT_LIGHT:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_PluginFramework:BOOL=OFF
-DCTK_PLUGIN_org.commontk.eventbus:BOOL=OFF
-DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
INSTALL_COMMAND ""
DEPENDS
${CTK_DEPENDENCIES}
)
set(CTK_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
else()
# The project is provided using CTK_DIR, nevertheless since other project may depend on CTK,
# let's add an 'empty' one
SlicerMacroEmptyExternalProject(${proj} "${CTK_DEPENDENCIES}")
endif()
ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
GIT_TAG "origin/master"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
${ep_common_args}
-DADDITIONAL_CXX_FLAGS=${ep_common_cxx_flags}
-DADDITIONAL_C_FLAGS=${ep_common_c_flags}
-DCTK_INSTALL_LIB_DIR:STRING=${Slicer_INSTALL_LIB_DIR}
-DCTK_USE_GIT_PROTOCOL:BOOL=${Slicer_USE_GIT_PROTOCOL}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DVTK_DIR:PATH=${VTK_DIR}
-DITK_DIR:PATH=${ITK_DIR}
-DPYTHON_LIBRARY:FILEPATH=${slicer_PYTHON_LIBRARY}
-DPYTHON_INCLUDE_DIR:PATH=${slicer_PYTHON_INCLUDE}
-DPYTHON_EXECUTABLE:FILEPATH=${slicer_PYTHON_EXECUTABLE}
-DCTK_LIB_Widgets:BOOL=ON
-DCTK_LIB_Visualization/VTK/Widgets:BOOL=ON
-DCTK_LIB_ImageProcessing/ITK/Core:BOOL=ON
-DCTK_LIB_Scripting/Python/Core:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTUITOOLS:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_Scripting/Python/Widgets:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_WRAP_PYTHONQT_LIGHT:BOOL=${Slicer_USE_PYTHONQT}
-DCTK_LIB_PluginFramework:BOOL=OFF
-DCTK_PLUGIN_org.commontk.eventbus:BOOL=OFF
-DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
INSTALL_COMMAND ""
DEPENDS
${CTK_DEPENDENCIES}
)
set(CTK_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
else()
# The project is provided using CTK_DIR, nevertheless since other project may depend on CTK,
# let's add an 'empty' one
SlicerMacroEmptyExternalProject(${proj} "${CTK_DEPENDENCIES}")
endif()
......@@ -35,15 +35,13 @@ if(NOT DEFINED VTK_DIR OR NOT DEFINED VTK_SOURCE_DIR)
set(VTK_QT_ARGS)
if(NOT APPLE)
if(Slicer_USE_QT)
set(VTK_QT_ARGS
#-DDESIRED_QT_VERSION:STRING=4 # Unused
-DVTK_USE_GUISUPPORT:BOOL=ON
-DVTK_USE_QVTK_QTOPENGL:BOOL=ON
-DVTK_USE_QT:BOOL=ON
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
)
endif()
set(VTK_QT_ARGS
#-DDESIRED_QT_VERSION:STRING=4 # Unused
-DVTK_USE_GUISUPPORT:BOOL=ON
-DVTK_USE_QVTK_QTOPENGL:BOOL=ON
-DVTK_USE_QT:BOOL=ON
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
)
else()
set(VTK_QT_ARGS
-DVTK_USE_CARBON:BOOL=OFF
......
......@@ -72,35 +72,33 @@ endif()
# -------------------------------------------------------------------------
# Find and install QT
# -------------------------------------------------------------------------
if(Slicer_USE_QT)
SET(QT_INSTALL_LIB_DIR ${Slicer_INSTALL_LIB_DIR})
SET(QT_INSTALL_LIB_DIR ${Slicer_INSTALL_LIB_DIR})
SET (QTLIBLIST QTCORE QTGUI QTNETWORK QTXML QTTEST QTSQL QTOPENGL QTWEBKIT PHONON QTXMLPATTERNS)
IF(UNIX OR APPLE)
LIST(APPEND QTLIBLIST QTDBUS)
ENDIF()
FOREACH(qtlib ${QTLIBLIST})
IF (QT_${qtlib}_LIBRARY_RELEASE)
IF(APPLE)
INSTALL(DIRECTORY "${QT_${qtlib}_LIBRARY_RELEASE}"
DESTINATION ${QT_INSTALL_LIB_DIR} COMPONENT Runtime)
ELSEIF(UNIX)
# Install .so and versioned .so.x.y
GET_FILENAME_COMPONENT(QT_LIB_DIR_tmp ${QT_${qtlib}_LIBRARY_RELEASE} PATH)
GET_FILENAME_COMPONENT(QT_LIB_NAME_tmp ${QT_${qtlib}_LIBRARY_RELEASE} NAME)
INSTALL(DIRECTORY ${QT_LIB_DIR_tmp}/
DESTINATION ${QT_INSTALL_LIB_DIR} COMPONENT Runtime
FILES_MATCHING PATTERN "${QT_LIB_NAME_tmp}*"
PATTERN "${QT_LIB_NAME_tmp}*.debug" EXCLUDE)
ELSEIF(WIN32)
GET_FILENAME_COMPONENT(QT_DLL_PATH_tmp ${QT_QMAKE_EXECUTABLE} PATH)
INSTALL(FILES ${QT_DLL_PATH_tmp}/${qtlib}4.dll
DESTINATION bin COMPONENT Runtime)
ENDIF()
SET (QTLIBLIST QTCORE QTGUI QTNETWORK QTXML QTTEST QTSQL QTOPENGL QTWEBKIT PHONON QTXMLPATTERNS)
IF(UNIX OR APPLE)
LIST(APPEND QTLIBLIST QTDBUS)