diff --git a/Applications/CoreApp/CMakeLists.txt b/Applications/CoreApp/CMakeLists.txt index 7cc6731c54..b517434c0d 100644 --- a/Applications/CoreApp/CMakeLists.txt +++ b/Applications/CoreApp/CMakeLists.txt @@ -1,35 +1,35 @@ project(CoreApp) set(_app_options) if(MITK_SHOW_CONSOLE_WINDOW) list(APPEND _app_options SHOW_CONSOLE) endif() # Create a cache entry for the provisioning file which is used to export # the file name in the MITKConfig.cmake file. This will keep external projects # which rely on this file happy. set(MITK_COREAPP_PROVISIONING_FILE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MitkCoreApp.provisioning" CACHE INTERNAL "CoreApp provisioning file" FORCE) set(_plugins org.blueberry.compat org.mitk.gui.qt.coreapplication org.mitk.gui.qt.stdmultiwidgeteditor ) # Plug-ins listed below will not be # - added as a build-time dependency to the executable # - listed in the provisioning file for the executable # - installed if they are external plug-ins set(_exclude_plugins ) FunctionCreateBlueBerryApplication( NAME MitkCoreApp DESCRIPTION "MITK - CoreApp Application" PLUGINS ${_plugins} ${_app_options} ) -mitk_use_modules(TARGET MitkCoreApp PACKAGES Qt4|QtGui) +mitk_use_modules(TARGET MitkCoreApp PACKAGES Qt4|QtGui Qt5|Widgets) # subproject support add_dependencies(MITK-CoreUI MitkCoreApp) diff --git a/Applications/PluginGenerator/CMakeLists.txt b/Applications/PluginGenerator/CMakeLists.txt index 4a7a9b0620..3f48138cc5 100644 --- a/Applications/PluginGenerator/CMakeLists.txt +++ b/Applications/PluginGenerator/CMakeLists.txt @@ -1,77 +1,92 @@ -cmake_minimum_required(VERSION 2.8.5) +if (${CMAKE_SOURCE_DIR} EQUAL ${PROJECT_SOURCE_DIR}) + cmake_minimum_required(VERSION 2.8.9) +endif() project(MitkPluginGenerator) set(VERSION_MAJOR 1) set(VERSION_MINOR 4) set(VERSION_PATCH 0) set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) set(standalone_build 1) else() set(standalone_build 0) endif() #----------------------------------------------------------------------------- # Prerequisites #----------------------------------------------------------------------------- set(QT_DONT_USE_QTGUI 1) set(QT_USE_QTNETWORK 1) -find_package(Qt 4.7 REQUIRED) - -include(${QT_USE_FILE}) +if(MITK_USE_Qt4) + find_package(Qt 4.7 REQUIRED) + include(${QT_USE_FILE}) +else() + find_package(Qt5Network REQUIRED) +endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PluginGeneratorConfig.h.in" "${CMAKE_CURRENT_BINARY_DIR}/PluginGeneratorConfig.h" @ONLY) include_directories("${CMAKE_CURRENT_BINARY_DIR}") #----------------------------------------------------------------------------- # Executable #----------------------------------------------------------------------------- set(src_files PluginGenerator.cpp ctkCommandLineParser.cpp ) -qt4_wrap_cpp(src_files ctkCommandLineParser.h OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -qt4_add_resources(src_files plugin_template.qrc project_template.qrc) +if(MITK_USE_Qt4) + qt4_wrap_cpp(src_files ctkCommandLineParser.h OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + qt4_add_resources(src_files plugin_template.qrc project_template.qrc) +else() + qt5_wrap_cpp(src_files ctkCommandLineParser.h OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + qt5_add_resources(src_files plugin_template.qrc project_template.qrc) +endif() set(exec_target ${PROJECT_NAME}) add_executable(${exec_target} ${src_files}) -target_link_libraries(${exec_target} ${QT_LIBRARIES}) + +if(MITK_USE_Qt4) + target_link_libraries(${exec_target} ${QT_LIBRARIES}) +else() + target_link_libraries(${exec_target} Qt5::Network) +endif() if(NOT standalone_build) # subproject support add_dependencies(MITK-CoreUI ${exec_target}) endif() #----------------------------------------------------------------------------- # Win32 Convenience #----------------------------------------------------------------------------- if(WIN32 AND NOT standalone_build) file(TO_NATIVE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}" native_runtime_dir) add_custom_target(NewPlugin start "MITK PluginGenerator" /D "${native_runtime_dir}" cmd /K ${exec_target}.exe -h DEPENDS ${exec_target}) endif() #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if(NOT standalone_build) # Test the plugin generator include(mitkTestPluginGenerator) endif() #----------------------------------------------------------------------------- # Packaging support #----------------------------------------------------------------------------- if(standalone_build) include(SetupPackaging.cmake) endif() diff --git a/Modules/DicomRT/CMakeLists.txt b/Modules/DicomRT/CMakeLists.txt index 56e50c2ab7..73d625aeb2 100644 --- a/Modules/DicomRT/CMakeLists.txt +++ b/Modules/DicomRT/CMakeLists.txt @@ -1,12 +1,11 @@ # CREATE MODULE HERE IF (NOT DEFINED DCMTK_dcmrt_LIBRARY OR DCMTK_dcmrt_LIBRARY) MITK_CREATE_MODULE( INCLUDE_DIRS DataStructures DEPENDS MitkSegmentation MitkSceneSerializationBase PACKAGE_DEPENDS DCMTK - QT_MODULE ) ADD_SUBDIRECTORY(Testing) ELSE() MESSAGE("MITK DicomRT Support disabled because the DCMTK dcmrt library not found") ENDIF()