diff --git a/CMake/PackageDepends/MITK_Qt4_Config.cmake b/CMake/PackageDepends/MITK_Qt4_Config.cmake deleted file mode 100644 index 6d1d9f6397..0000000000 --- a/CMake/PackageDepends/MITK_Qt4_Config.cmake +++ /dev/null @@ -1,6 +0,0 @@ - -find_package(Qt4 REQUIRED) -include(${QT_USE_FILE}) -list(APPEND ALL_INCLUDE_DIRECTORIES ${QT_INCLUDE_DIRS}) -list(APPEND ALL_LIBRARIES ${QT_LIBRARIES}) - diff --git a/CMake/PackageDepends/Qt/MITK_Qt4_Config.cmake b/CMake/PackageDepends/Qt/MITK_Qt4_Config.cmake index 38b90cc321..8de0a4f43f 100644 --- a/CMake/PackageDepends/Qt/MITK_Qt4_Config.cmake +++ b/CMake/PackageDepends/Qt/MITK_Qt4_Config.cmake @@ -1,6 +1,4 @@ -message("*******MITK_Qt4_Config: **** MODULE_QT4_MODULES: ${MODULE_QT4_MODULES}") - find_package(Qt4 QUIET REQUIRED QtCore ${MODULE_QT4_MODULES}) # TODO we could need QUIET! include(${QT_USE_FILE}) list(APPEND ALL_INCLUDE_DIRECTORIES ${QT_INCLUDE_DIRS}) list(APPEND ALL_LIBRARIES ${QT_LIBRARIES}) diff --git a/CMake/mitkMacroCreateCTKPlugin.cmake b/CMake/mitkMacroCreateCTKPlugin.cmake index 0d30001f76..75bf2bda8b 100644 --- a/CMake/mitkMacroCreateCTKPlugin.cmake +++ b/CMake/mitkMacroCreateCTKPlugin.cmake @@ -1,77 +1,78 @@ macro(MACRO_CREATE_MITK_CTK_PLUGIN) MACRO_PARSE_ARGUMENTS(_PLUGIN "EXPORT_DIRECTIVE;EXPORTED_INCLUDE_SUFFIXES;MODULE_DEPENDENCIES;SUBPROJECTS" "TEST_PLUGIN;NO_INSTALL" ${ARGN}) MITK_CHECK_MODULE(_MODULE_CHECK_RESULT Mitk ${_PLUGIN_MODULE_DEPENDENCIES}) if(NOT _MODULE_CHECK_RESULT) + set(MODULE_QT4_MODULES QtGui) # should be moved into plugin definitions MITK_USE_MODULE(Mitk ${_PLUGIN_MODULE_DEPENDENCIES}) link_directories(${ALL_LIBRARY_DIRS}) include_directories(${ALL_INCLUDE_DIRECTORIES}) if(_PLUGIN_TEST_PLUGIN) set(is_test_plugin "TEST_PLUGIN") set(_PLUGIN_NO_INSTALL 1) else() set(is_test_plugin) endif() if(_PLUGIN_NO_INSTALL) set(plugin_no_install "NO_INSTALL") else() set(plugin_no_install) endif() MACRO_CREATE_CTK_PLUGIN(EXPORT_DIRECTIVE ${_PLUGIN_EXPORT_DIRECTIVE} EXPORTED_INCLUDE_SUFFIXES ${_PLUGIN_EXPORTED_INCLUDE_SUFFIXES} DOXYGEN_TAGFILES ${_PLUGIN_DOXYGEN_TAGFILES} MOC_OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED ${is_test_plugin} ${plugin_no_install}) target_link_libraries(${PLUGIN_TARGET} ${ALL_LIBRARIES}) if(ALL_META_DEPENDENCIES) add_dependencies(${PLUGIN_TARGET} ${ALL_META_DEPENDENCIES}) endif() if(MITK_DEFAULT_SUBPROJECTS AND NOT MY_SUBPROJECTS) set(MY_SUBPROJECTS ${MITK_DEFAULT_SUBPROJECTS}) endif() if(MY_SUBPROJECTS) set_property(TARGET ${PLUGIN_TARGET} PROPERTY LABELS ${MY_SUBPROJECTS}) foreach(subproject ${MY_SUBPROJECTS}) add_dependencies(${subproject} ${PLUGIN_TARGET}) endforeach() endif() #------------------------------------------------------------# #------------------ Installer support -----------------------# if(NOT _PLUGIN_NO_INSTALL) set(_autoload_targets ) foreach(_dependency ${ALL_DEPENDENCIES}) get_target_property(_dep_autoloads ${_dependency} MITK_AUTOLOAD_TARGETS) if (_dep_autoloads) list(APPEND _autoload_targets ${_dep_autoloads}) endif() endforeach() # The MITK_AUTOLOAD_TARGETS property is used in the mitkFunctionInstallAutoLoadModules # macro which expects a list of plug-in targets. if (_autoload_targets) list(REMOVE_DUPLICATES _autoload_targets) set_target_properties(${PLUGIN_TARGET} PROPERTIES MITK_AUTOLOAD_TARGETS "${_autoload_targets}") endif() endif() else(NOT _MODULE_CHECK_RESULT) if(NOT MITK_BUILD_ALL_PLUGINS) message(SEND_ERROR "${PROJECT_NAME} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}") else() message(STATUS "${PROJECT_NAME} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}") endif() endif(NOT _MODULE_CHECK_RESULT) endmacro() diff --git a/Modules/DeformableRegistrationUI/CMakeLists.txt b/Modules/DeformableRegistrationUI/CMakeLists.txt index 89c824517c..96b8ee467d 100644 --- a/Modules/DeformableRegistrationUI/CMakeLists.txt +++ b/Modules/DeformableRegistrationUI/CMakeLists.txt @@ -1,6 +1,6 @@ MITK_CREATE_MODULE(MitkDeformableRegistrationUI SUBPROJECTS MITK-Registration DEPENDS Qmitk MitkDeformableRegistration - QT_MODULE + QT4_MODULES QtGui EXPORT_DEFINE MITK_DEFORMABLEREGISTRATION_UI_EXPORT ) diff --git a/Modules/DicomUI/CMakeLists.txt b/Modules/DicomUI/CMakeLists.txt index 2dc214a7b1..577f6054af 100644 --- a/Modules/DicomUI/CMakeLists.txt +++ b/Modules/DicomUI/CMakeLists.txt @@ -1,12 +1,10 @@ -set(QT_USE_QTSQL 1) - include_directories(${CTK_INCLUDE_DIRS}) MITK_CREATE_MODULE(mitkDicomUI DEPENDS QmitkExt PACKAGE_DEPENDS CTK - QT_MODULE + QT4_MODULES QtGui QtSql EXPORT_DEFINE MITK_DICOMUI_EXPORT ) # Mitk MitkExt to make linux happy diff --git a/Modules/GPGPU/CMakeLists.txt b/Modules/GPGPU/CMakeLists.txt index fbb7059468..a07e5d5d6c 100644 --- a/Modules/GPGPU/CMakeLists.txt +++ b/Modules/GPGPU/CMakeLists.txt @@ -1,19 +1,19 @@ if(APPLE) message(STATUS "Module GPGPU is not ported to MacOS yet") else(APPLE) set(package_deps) if(UNIX) list(APPEND package_deps X11) endif() MITK_CREATE_MODULE(mitkGPGPU # INCLUDE_DIRS . DEPENDS Mitk - PACKAGE_DEPENDS Qt4 ${package_deps} GLEW + PACKAGE_DEPENDS ${package_deps} GLEW EXPORT_DEFINE GPGPU_DLL_API - QT_MODULE + QT4_MODULES QtCore QtGui ) endif(APPLE) diff --git a/Modules/IGTUI/CMakeLists.txt b/Modules/IGTUI/CMakeLists.txt index 83161cf33e..8403a57dab 100644 --- a/Modules/IGTUI/CMakeLists.txt +++ b/Modules/IGTUI/CMakeLists.txt @@ -1,12 +1,12 @@ MITK_CREATE_MODULE(MitkIGTUI SUBPROJECTS MITK-IGT INCLUDE_DIRS Qmitk DEPENDS MitkIGT Qmitk QmitkExt - QT_MODULE + QT4_MODULES QtGui GENERATED_CPP ${TOOL_GUI_CPPS} ${TOOL_CPPS} ) ## create IGTUI config configure_file(mitkIGTUIConfig.h.in ${PROJECT_BINARY_DIR}/mitkIGTUIConfig.h @ONLY) diff --git a/Modules/Overlays/CMakeLists.txt b/Modules/Overlays/CMakeLists.txt index 8fc78bfad1..9a5dadda84 100644 --- a/Modules/Overlays/CMakeLists.txt +++ b/Modules/Overlays/CMakeLists.txt @@ -1,5 +1,5 @@ MITK_CREATE_MODULE( Overlays DEPENDS Qmitk - PACKAGE_DEPENDS Qt4 QVTK - QT_MODULE + PACKAGE_DEPENDS QVTK + QT4_MODULES QtGui ) diff --git a/Modules/RigidRegistration/CMakeLists.txt b/Modules/RigidRegistration/CMakeLists.txt index 9be694ca5e..ae71051393 100644 --- a/Modules/RigidRegistration/CMakeLists.txt +++ b/Modules/RigidRegistration/CMakeLists.txt @@ -1,7 +1,8 @@ MITK_CREATE_MODULE(MitkRigidRegistration SUBPROJECTS MITK-Registration DEPENDS Mitk + QT4_MODULES QtGui EXPORT_DEFINE MITK_RIGIDREGISTRATION_EXPORT ) add_subdirectory(Testing) diff --git a/Modules/RigidRegistrationUI/CMakeLists.txt b/Modules/RigidRegistrationUI/CMakeLists.txt index 7edd59da5c..871aa796a3 100644 --- a/Modules/RigidRegistrationUI/CMakeLists.txt +++ b/Modules/RigidRegistrationUI/CMakeLists.txt @@ -1,7 +1,7 @@ MITK_CREATE_MODULE(MitkRigidRegistrationUI SUBPROJECTS MITK-Registration INCLUDE_DIRS RigidRegistrationMetrics RigidRegistrationOptimizer RigidRegistrationTransforms DEPENDS Qmitk MitkRigidRegistration - QT_MODULE + QT4_MODULES QtGui EXPORT_DEFINE MITK_RIGIDREGISTRATION_UI_EXPORT ) diff --git a/Modules/SegmentationUI/CMakeLists.txt b/Modules/SegmentationUI/CMakeLists.txt index 695d75addc..a6a331c06e 100644 --- a/Modules/SegmentationUI/CMakeLists.txt +++ b/Modules/SegmentationUI/CMakeLists.txt @@ -1,6 +1,6 @@ MITK_CREATE_MODULE ( SegmentationUI INCLUDE_DIRS Qmitk DEPENDS Qmitk Segmentation QmitkExt -PACKAGE_DEPENDS Qt4 CTK -QT_MODULE +PACKAGE_DEPENDS CTK +QT4_MODULES QtCore QtGui ) diff --git a/Modules/ToFUI/CMakeLists.txt b/Modules/ToFUI/CMakeLists.txt index 7320e2a23a..07b31b76c8 100644 --- a/Modules/ToFUI/CMakeLists.txt +++ b/Modules/ToFUI/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE(mitkTOFUI SUBPROJECTS MITK-ToF INCLUDE_DIRS Qmitk DEPENDS mitkToFHardware mitkToFProcessing Qmitk QmitkExt Overlays - QT_MODULE + QT4_MODULES QtGui GENERATED_CPP ${TOOL_GUI_CPPS} ${TOOL_CPPS} ) diff --git a/Modules/USUI/CMakeLists.txt b/Modules/USUI/CMakeLists.txt index 10c7fde455..586355d8a6 100644 --- a/Modules/USUI/CMakeLists.txt +++ b/Modules/USUI/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE(MitkUSUI #SUBPROJECTS MITK-US INCLUDE_DIRS Qmitk DEPENDS Mitk MitkUS Qmitk QmitkExt - QT_MODULE + QT4_MODULES QtGui GENERATED_CPP ${TOOL_GUI_CPPS} ${TOOL_CPPS} )