diff --git a/Applications/PluginGenerator/ProjectTemplate/Apps/TemplateApp/CMakeLists.txt b/Applications/PluginGenerator/ProjectTemplate/Apps/TemplateApp/CMakeLists.txt index d45f3907fc..3e992f0312 100644 --- a/Applications/PluginGenerator/ProjectTemplate/Apps/TemplateApp/CMakeLists.txt +++ b/Applications/PluginGenerator/ProjectTemplate/Apps/TemplateApp/CMakeLists.txt @@ -1,22 +1,22 @@ set(_app_options) if(${MY_PROJECT_NAME}_SHOW_CONSOLE_WINDOW) list(APPEND _app_options SHOW_CONSOLE) endif() # 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 ${MY_APP_NAME} DESCRIPTION "MITK - ${MY_APP_NAME} Application" EXCLUDE_PLUGINS ${_exclude_plugins} ${_app_options} ) -mitk_use_modules(TARGET ${MY_APP_NAME} PACKAGES Qt4>QtGui) +mitk_use_modules(TARGET ${MY_APP_NAME} PACKAGES Qt4|QtGui) diff --git a/CMake/mitkMacroCreateModuleConf.cmake b/CMake/mitkMacroCreateModuleConf.cmake index 471b7af9df..4b7bcfd099 100644 --- a/CMake/mitkMacroCreateModuleConf.cmake +++ b/CMake/mitkMacroCreateModuleConf.cmake @@ -1,35 +1,35 @@ ################################################################### # # MITK_CREATE_MODULE_CONF # # This can be called in a similar way like MITK_CREATE_MODULE # but it just creates the module configuration files without # actually building it. It is used for integration of legacy libraries # into the MITK module build system # ################################################################## macro(MITK_CREATE_MODULE_CONF MODULE_NAME_IN) MACRO_PARSE_ARGUMENTS(MODULE "INCLUDE_DIRS;DEPENDS;PACKAGE_DEPENDS" "QT_MODULE;HEADERS_ONLY" ${ARGN}) set(MODULE_NAME ${MODULE_NAME_IN}) if(MODULE_HEADERS_ONLY) set(MODULE_PROVIDES ) else() set(MODULE_PROVIDES ${MODULE_NAME}) endif() set(MODULE_IS_ENABLED 1) if(MODULE_QT_MODULE) message(WARNING "The QT_MODULE option is deprecated. Please use PACKAGE_DEPENDS Qt4|QtCore and/or PACKAGE_DEPENDS Qt5|Core instead.") if (NOT "${MODULE_PACKAGE_DEPENDS}" MATCHES "^.*Qt4.*$") - list(APPEND MODULE_PACKAGE_DEPENDS Qt4>QtGui) + list(APPEND MODULE_PACKAGE_DEPENDS Qt4|QtGui) endif() endif() list(APPEND MODULE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) _MITK_CREATE_MODULE_CONF() endmacro(MITK_CREATE_MODULE_CONF) macro(_MITK_CREATE_MODULE_CONF) set(${MODULE_NAME}_CONFIG_FILE "${CMAKE_BINARY_DIR}/${MODULES_CONF_DIRNAME}/${MODULE_NAME}Config.cmake" CACHE INTERNAL "Path to module config" FORCE) configure_file(${MITK_SOURCE_DIR}/CMake/moduleConf.cmake.in ${${MODULE_NAME}_CONFIG_FILE} @ONLY) endmacro(_MITK_CREATE_MODULE_CONF) diff --git a/Examples/BlueBerryExampleLauncher/CMakeLists.txt b/Examples/BlueBerryExampleLauncher/CMakeLists.txt index eda5d842b2..2cd2b7188d 100644 --- a/Examples/BlueBerryExampleLauncher/CMakeLists.txt +++ b/Examples/BlueBerryExampleLauncher/CMakeLists.txt @@ -1,85 +1,85 @@ project(BlueBerryExampleLauncher) set(_source_files BlueBerryExampleLauncher.cpp BlueBerryExampleLauncherDialog.cpp ) set(_source_moc_h_files BlueBerryExampleLauncherDialog.h ) set(_source_ui_files BlueBerryExampleLauncherDialog.ui ) # this is a workaround for Visual Studio. The relative include paths in the generated # moc files can get very long and can't be resolved by the MSVC compiler. foreach(_moc_src ${_source_moc_h_files}) qt4_wrap_cpp(_source_files ${_moc_src} OPTIONS -f${_moc_src}) endforeach() qt4_wrap_ui(_source_files ${_source_ui_files}) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) #----------------------------------------------------------------------------- # Create provisioning files #----------------------------------------------------------------------------- set(_plugins_for_all_demos org.blueberry.compat ) file(GLOB _demo_configurations Configurations/*.cmake) set(ALL_REQUIRED_PLUGINS ${_plugins_for_all_demos}) foreach(_demo_config_file ${_demo_configurations}) set(REQUIRED_PLUGINS ) set(DESCRIPTION ) include(${_demo_config_file}) get_filename_component(_name ${_demo_config_file} NAME_WE) FunctionCreateProvisioningFile(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}_${_name}.provisioning PLUGINS ${REQUIRED_PLUGINS} ${_plugins_for_all_demos} NO_INSTALL ) if(DESCRIPTION) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/BlueBerryExampleDescription.txt ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}_${_name}.txt @ONLY) endif() list(APPEND ALL_REQUIRED_PLUGINS ${REQUIRED_PLUGINS}) endforeach() list(REMOVE_DUPLICATES ALL_REQUIRED_PLUGINS) set(ALL_REQUIRED_PLUGIN_TARGETS ) foreach(req_plugin ${ALL_REQUIRED_PLUGINS}) string(REPLACE "." "_" _plugin_target ${req_plugin}) if(TARGET ${_plugin_target}) list(APPEND ALL_REQUIRED_PLUGIN_TARGETS ${_plugin_target}) endif() endforeach() #----------------------------------------------------------------------------- # Create the example launcher #----------------------------------------------------------------------------- FunctionCreateBlueBerryApplication( NAME ${PROJECT_NAME} DESCRIPTION "MITK Application Framework Demo" SOURCES ${_source_files} # PLUGINS ${ALL_REQUIRED_PLUGIN_TARGETS} NO_PROVISIONING NO_INSTALL SHOW_CONSOLE ) -mitk_use_modules(TARGET ${PROJECT_NAME} PACKAGES Qt4>QtGui) +mitk_use_modules(TARGET ${PROJECT_NAME} PACKAGES Qt4|QtGui) add_dependencies(${PROJECT_NAME} ${ALL_REQUIRED_PLUGIN_TARGETS}) # subproject support set_property(TARGET ${PROJECT_NAME} PROPERTY LABELS ${MITK_DEFAULT_SUBPROJECTS}) foreach(subproject ${MITK_DEFAULT_SUBPROJECTS}) add_dependencies(${subproject} ${PROJECT_NAME}) endforeach()