diff --git a/Applications/CoreApp/CMakeLists.txt b/Applications/CoreApp/CMakeLists.txt index 3141a952d4..a76d19df80 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}/CoreApp.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 CoreApp DESCRIPTION "MITK - CoreApp Application" PLUGINS ${_plugins} ${_app_options} ) -mitk_use_modules(TARGET CoreApp PACKAGES Qt4>QtGui) +mitk_use_modules(TARGET CoreApp PACKAGES Qt4|QtGui) # subproject support add_dependencies(MITK-CoreUI CoreApp) diff --git a/BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake b/BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake index caf575b5fb..5f08c8121c 100644 --- a/BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake +++ b/BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake @@ -1,229 +1,229 @@ #! #! Create a BlueBerry application. #! #! \brief This function will create a BlueBerry application together with all #! necessary provisioning and configuration data and install support. #! #! \param NAME (required) The name of the executable. #! \param DESCRIPTION (optional) A human-readable description of your application. #! The usage depends on the CPack generator (on Windows, this is a descriptive #! text for the created shortcuts). #! \param SOURCES (optional) A list of source files to compile into your executable. Defaults #! to .cpp. #! \param PLUGINS (optional) A list of required plug-ins. Defaults to all known plug-ins. #! \param EXCLUDE_PLUGINS (optional) A list of plug-ins which should not be used. Mainly #! useful if PLUGINS was not used. #! \param LINK_LIBRARIES A list of libraries to be linked with the executable. #! \param LIBRARY_DIRS A list of directories to pass through to MITK_INSTALL_TARGETS #! \param SHOW_CONSOLE (option) Show the console output window (on Windows). #! \param NO_PROVISIONING (option) Do not create provisioning files. #! \param NO_INSTALL (option) Do not install this executable #! #! Assuming that there exists a file called MyApp.cpp, an example call looks like: #! \code #! FunctionCreateBlueBerryApplication( #! NAME MyApp #! DESCRIPTION "MyApp - New ways to explore medical data" #! EXCLUDE_PLUGINS org.mitk.gui.qt.extapplication #! SHOW_CONSOLE #! ) #! \endcode #! function(FunctionCreateBlueBerryApplication) macro_parse_arguments(_APP "NAME;DESCRIPTION;SOURCES;PLUGINS;EXCLUDE_PLUGINS;LINK_LIBRARIES;LIBRARY_DIRS" "SHOW_CONSOLE;NO_PROVISIONING;NO_INSTALL" ${ARGN}) if(NOT _APP_NAME) message(FATAL_ERROR "NAME argument cannot be empty.") endif() if(NOT _APP_SOURCES) set(_APP_SOURCES ${_APP_NAME}.cpp) endif() if(NOT _APP_PLUGINS) ctkFunctionGetAllPluginTargets(_APP_PLUGINS) else() set(_plugins ${_APP_PLUGINS}) set(_APP_PLUGINS) foreach(_plugin ${_plugins}) string(REPLACE "." "_" _plugin_target ${_plugin}) list(APPEND _APP_PLUGINS ${_plugin_target}) endforeach() # get all plug-in dependencies ctkFunctionGetPluginDependencies(_plugin_deps PLUGINS ${_APP_PLUGINS} ALL) # add the dependencies to the list of application plug-ins list(APPEND _APP_PLUGINS ${_plugin_deps}) endif() #------------------------------------------------------------------------ # Prerequesites #------------------------------------------------------------------------ find_package(MITK REQUIRED) find_package(Poco REQUIRED) # ----------------------------------------------------------------------- # Set up include and link dirs for the executable # ----------------------------------------------------------------------- include_directories( ${org_blueberry_osgi_INCLUDE_DIRS} ) # ----------------------------------------------------------------------- # Add executable icon (Windows) # ----------------------------------------------------------------------- set(WINDOWS_ICON_RESOURCE_FILE "") if(WIN32) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/icons/${_APP_NAME}.rc") set(WINDOWS_ICON_RESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/icons/${_APP_NAME}.rc") endif() endif() # ----------------------------------------------------------------------- # Create the executable and link libraries # ----------------------------------------------------------------------- set(_app_compile_flags ) if(WIN32) set(_app_compile_flags "${_app_compile_flags} -DPOCO_NO_UNWINDOWS -DWIN32_LEAN_AND_MEAN") endif() # Work-around for linking GDCM libraries, until GDCM provides proper # target exports. foreach(dir ${MODULES_PACKAGE_DEPENDS_DIRS}) if(EXISTS "${dir}/MITK_GDCM_Config.cmake") include("${dir}/MITK_GDCM_Config.cmake") break() endif() endforeach() if(ALL_LIBRARY_DIRS) list(REMOVE_DUPLICATES ALL_LIBRARY_DIRS) link_directories(${ALL_LIBRARY_DIRS}) endif() if(_APP_SHOW_CONSOLE) add_executable(${_APP_NAME} MACOSX_BUNDLE ${_APP_SOURCES} ${WINDOWS_ICON_RESOURCE_FILE}) else() add_executable(${_APP_NAME} MACOSX_BUNDLE WIN32 ${_APP_SOURCES} ${WINDOWS_ICON_RESOURCE_FILE}) endif() -mitk_use_modules(TARGET ${_APP_NAME} MODULES mbilog PACKAGES Poco Qt4>QtCore) +mitk_use_modules(TARGET ${_APP_NAME} MODULES mbilog PACKAGES Poco Qt4|QtCore) set_target_properties(${_APP_NAME} PROPERTIES COMPILE_FLAGS "${_app_compile_flags}") target_link_libraries(${_APP_NAME} org_blueberry_osgi ${_APP_LINK_LIBRARIES}) if(WIN32) target_link_libraries(${_APP_NAME} ${QT_QTMAIN_LIBRARY}) endif() # ----------------------------------------------------------------------- # Add executable icon and bundle name (Mac) # ----------------------------------------------------------------------- if(APPLE) if( _APP_DESCRIPTION) set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_NAME "${_APP_DESCRIPTION}") else() set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_NAME "${_APP_NAME}") endif() set(icon_name "icon.icns") set(icon_full_path "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon_name}") if(EXISTS "${icon_full_path}") set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${icon_name}") file(COPY ${icon_full_path} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/") INSTALL (FILES ${icon_full_path} DESTINATION "${_APP_NAME}.app/Contents/Resources/") endif() endif() # ----------------------------------------------------------------------- # Set build time dependencies # ----------------------------------------------------------------------- # This ensures that all enabled plug-ins are up-to-date when the # executable is build. if(_APP_PLUGINS) ctkMacroGetAllProjectTargetLibraries("${_APP_PLUGINS}" _project_plugins) if(_APP_EXCLUDE_PLUGINS) set(_exclude_targets) foreach(_exclude_plugin ${_APP_EXCLUDE_PLUGINS}) string(REPLACE "." "_" _exclude_target ${_exclude_plugin}) list(APPEND _exclude_targets ${_exclude_target}) endforeach() list(REMOVE_ITEM _project_plugins ${_exclude_targets}) endif() if(_project_plugins) add_dependencies(${_APP_NAME} ${_project_plugins}) endif() endif() # ----------------------------------------------------------------------- # Additional files needed for the executable # ----------------------------------------------------------------------- if(NOT _APP_NO_PROVISIONING) # Create a provisioning file, listing all plug-ins set(_prov_file "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.provisioning") FunctionCreateProvisioningFile(FILE ${_prov_file} PLUGINS ${_APP_PLUGINS} EXCLUDE_PLUGINS ${_APP_EXCLUDE_PLUGINS} ) endif() # Create a .ini file for initial parameters if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_APP_NAME}.ini") configure_file(${_APP_NAME}.ini ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.ini) endif() # Create batch files for Windows platforms if(WIN32) set(template_name "start${_APP_NAME}.bat.in") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${template_name}") foreach(BUILD_TYPE debug release) mitkFunctionCreateWindowsBatchScript(${template_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/start${_APP_NAME}_${BUILD_TYPE}.bat ${BUILD_TYPE}) endforeach() endif() endif(WIN32) # ----------------------------------------------------------------------- # Install support # ----------------------------------------------------------------------- if(NOT _APP_NO_INSTALL) # This installs all third-party CTK plug-ins FunctionInstallThirdPartyCTKPlugins(${_APP_PLUGINS} EXCLUDE ${_APP_EXCLUDE_PLUGINS}) if(COMMAND BlueBerryApplicationInstallHook) set(_real_app_plugins ${_APP_PLUGINS}) if(_APP_EXCLUDE_PLUGINS) list(REMOVE_ITEM _real_app_plugins ${_APP_EXCLUDE_PLUGINS}) endif() BlueBerryApplicationInstallHook(APP_NAME ${_APP_NAME} PLUGINS ${_real_app_plugins}) endif() # Install the executable MITK_INSTALL_TARGETS(EXECUTABLES ${_APP_NAME} LIBRARY_DIRS ${_APP_LIBRARY_DIRS} GLOB_PLUGINS ) if(NOT _APP_NO_PROVISIONING) # Install the provisioning file mitkFunctionInstallProvisioningFiles(${_prov_file}) endif() # On Linux, create a shell script to start a relocatable application if(UNIX AND NOT APPLE) install(PROGRAMS "${MITK_SOURCE_DIR}/CMake/RunInstalledApp.sh" DESTINATION "." RENAME ${_APP_NAME}.sh) endif() # Tell cpack the executables that you want in the start menu as links set(MITK_CPACK_PACKAGE_EXECUTABLES ${MITK_CPACK_PACKAGE_EXECUTABLES} "${_APP_NAME};${_APP_DESCRIPTION}" CACHE INTERNAL "Collecting windows shortcuts to executables") endif() endfunction() diff --git a/CMake/mitkFunctionCreateModule.cmake b/CMake/mitkFunctionCreateModule.cmake index cde0a7422b..9e0594be2f 100644 --- a/CMake/mitkFunctionCreateModule.cmake +++ b/CMake/mitkFunctionCreateModule.cmake @@ -1,544 +1,544 @@ function(_link_directories_for_packages) set(ALL_LIBRARY_DIRS ) foreach(package ${ARGN}) if(NOT ${package} MATCHES "^(Qt[45].*|ITK|VTK)$") foreach(dir ${MODULES_PACKAGE_DEPENDS_DIRS}) if(EXISTS "${dir}/MITK_${package}_Config.cmake") include("${dir}/MITK_${package}_Config.cmake") break() endif() endforeach() endif() endforeach() if(ALL_LIBRARY_DIRS) list(REMOVE_DUPLICATES ALL_LIBRARY_DIRS) link_directories(${ALL_LIBRARY_DIRS}) endif() endfunction() ################################################################## # # mitk_create_module # #! Creates a module for the automatic module dependency system within MITK. #! Configurations are generated in the moduleConf directory. #! #! USAGE: #! #! \code #! MITK_CREATE_MODULE( #! [INCLUDE_DIRS ] #! [INTERNAL_INCLUDE_DIRS ] #! [DEPENDS ] #! [PACKAGE_DEPENDS ] #! [TARGET_DEPENDS #! [EXPORT_DEFINE ] #! [QT_MODULE] #! [HEADERS_ONLY] #! [WARNINGS_AS_ERRORS] #! \endcode #! #! A modules source files are specified in a separate CMake file usually #! called files.cmake, located in the module root directory. The #! mitk_create_module() macro evaluates the following CMake variables #! from the files.cmake file: #! #! - CPP_FILES A list of .cpp files #! - H_FILES A list of .h files without a corresponding .cpp file #! - TXX_FILES A list of .txx files #! - RESOURCE_FILES A list of files (resources) which are embedded into the module #! - MOC_H_FILES A list of Qt header files which should be processed by the MOC #! - UI_FILES A list of .ui Qt UI files #! - QRC_FILES A list of .qrc Qt resource files #! - DOX_FILES A list of .dox Doxygen files #! #! List of variables available after the function is called: #! - MODULE_NAME #! - MODULE_IS_ENABLED #! #! \param MODULE_NAME_IN The name for the new module #! \param HEADERS_ONLY specify this if the modules just contains header files. ################################################################## function(mitk_create_module MODULE_NAME_IN) set(_macro_params SUBPROJECTS # list of CDash labels VERSION # module version number, e.g. "1.2.0" INCLUDE_DIRS # exported include dirs (used in mitkMacroCreateModuleConf.cmake) INTERNAL_INCLUDE_DIRS # include dirs internal to this module DEPENDS # list of modules this module depends on DEPENDS_INTERNAL # list of modules this module internally depends on PACKAGE_DEPENDS # list of "packages this module depends on (e.g. Qt, VTK, etc.) TARGET_DEPENDS # list of CMake targets this module should depend on EXPORT_DEFINE # export macro name for public symbols of this module AUTOLOAD_WITH # a module target name identifying the module which will trigger the # automatic loading of this module ADDITIONAL_LIBS # list of addidtional libraries linked to this module FILES_CMAKE # file name of a CMake file setting source list variables # (defaults to files.cmake) GENERATED_CPP # not used (?) DEPRECATED_SINCE # marks this modules as deprecated ) set(_macro_options QT_MODULE # the module makes use of Qt4 features and needs moc and ui generated files FORCE_STATIC # force building this module as a static library HEADERS_ONLY # this module is a headers-only library GCC_DEFAULT_VISIBILITY # do not use gcc visibility flags - all symbols will be exported NO_INIT # do not create CppMicroServices initialization code WARNINGS_AS_ERRORS # treat all compiler warnings as errors EXECUTABLE # create an executable; do not use directly, use mitk_create_executable() instead ) MACRO_PARSE_ARGUMENTS(MODULE "${_macro_params}" "${_macro_options}" ${ARGN}) set(MODULE_NAME ${MODULE_NAME_IN}) if(NOT MODULE_FILES_CMAKE) set(MODULE_FILES_CMAKE files.cmake) endif() if(NOT IS_ABSOLUTE ${MODULE_FILES_CMAKE}) set(MODULE_FILES_CMAKE ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILES_CMAKE}) endif() if (MODULE_QT_MODULE) - message(WARNING "QT_MODULE keyword is deprecated (in module ${MODULE_NAME}). Please use PACKAGE_DEPENDS Qt4>QtCore and/or PACKAGE_DEPENDS Qt5>Core instead") + message(WARNING "QT_MODULE keyword is deprecated (in module ${MODULE_NAME}). 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) endif() endif() if(MODULE_HEADERS_ONLY) set(MODULE_PROVIDES ) if(MODULE_AUTOLOAD_WITH) message(SEND_ERROR "A headers only module cannot be auto-loaded") endif() else() set(MODULE_PROVIDES ${MODULE_NAME}) if(NOT MODULE_NO_INIT AND NOT MODULE_NAME STREQUAL "Mitk") # Add a dependency to the "Mitk" module #list(APPEND MODULE_DEPENDS Mitk) endif() endif() if(MODULE_DEPRECATED_SINCE) set(MODULE_IS_DEPRECATED 1) else() set(MODULE_IS_DEPRECATED 0) endif() if(NOT MODULE_SUBPROJECTS) if(MITK_DEFAULT_SUBPROJECTS) set(MODULE_SUBPROJECTS ${MITK_DEFAULT_SUBPROJECTS}) endif() endif() # check if the subprojects exist as targets if(MODULE_SUBPROJECTS) foreach(subproject ${MODULE_SUBPROJECTS}) if(NOT TARGET ${subproject}) message(SEND_ERROR "The subproject ${subproject} does not have a corresponding target") endif() endforeach() endif() # check and set-up auto-loading if(MODULE_AUTOLOAD_WITH) if(NOT TARGET "${MODULE_AUTOLOAD_WITH}") message(SEND_ERROR "The module target \"${MODULE_AUTOLOAD_WITH}\" specified as the auto-loading module for \"${MODULE_NAME}\" does not exist") endif() # create a meta-target if it does not already exist set(_module_autoload_meta_target "${MODULE_AUTOLOAD_WITH}-autoload") if(NOT TARGET ${_module_autoload_meta_target}) add_custom_target(${_module_autoload_meta_target}) endif() endif() # assume worst case set(MODULE_IS_ENABLED 0) # first we check if we have an explicit module build list if(MITK_MODULES_TO_BUILD) list(FIND MITK_MODULES_TO_BUILD ${MODULE_NAME} _MOD_INDEX) if(_MOD_INDEX EQUAL -1) set(MODULE_IS_EXCLUDED 1) endif() endif() if(NOT MODULE_IS_EXCLUDED) # first of all we check for the dependencies _mitk_parse_package_args(${MODULE_PACKAGE_DEPENDS}) mitk_check_module_dependencies(MODULES ${MODULE_DEPENDS} PACKAGES ${PACKAGE_NAMES} MISSING_DEPENDENCIES_VAR _MISSING_DEP PACKAGE_DEPENDENCIES_VAR PACKAGE_NAMES) if(_MISSING_DEP) message("Module ${MODULE_NAME} won't be built, missing dependency: ${_MISSING_DEP}") set(MODULE_IS_ENABLED 0) else() set(MODULE_IS_ENABLED 1) # now check for every package if it is enabled. This overlaps a bit with # MITK_CHECK_MODULE ... foreach(_package ${PACKAGE_NAMES}) if((DEFINED MITK_USE_${_package}) AND NOT (MITK_USE_${_package})) message("Module ${MODULE_NAME} won't be built. Turn on MITK_USE_${_package} if you want to use it.") set(MODULE_IS_ENABLED 0) break() endif() endforeach() if(MODULE_IS_ENABLED) # clear variables defined in files.cmake set(RESOURCE_FILES ) set(CPP_FILES ) set(H_FILES ) set(TXX_FILES ) set(DOX_FILES ) set(UI_FILES ) set(MOC_H_FILES ) set(QRC_FILES ) # clear other variables set(Q${KITNAME}_GENERATED_CPP ) set(Q${KITNAME}_GENERATED_MOC_CPP ) set(Q${KITNAME}_GENERATED_QRC_CPP ) set(Q${KITNAME}_GENERATED_UI_CPP ) # Convert relative include dirs to absolute dirs set(_include_dirs . ${MODULE_INCLUDE_DIRS}) set(MODULE_INCLUDE_DIRS) foreach(dir ${_include_dirs}) get_filename_component(_abs_dir ${dir} ABSOLUTE) list(APPEND MODULE_INCLUDE_DIRS ${_abs_dir}) endforeach() list(APPEND MODULE_INCLUDE_DIRS ${MITK_BINARY_DIR} ${MODULES_CONF_DIRS}) # Convert relative internal include dirs to absolute dirs set(_include_dirs ${MODULE_INTERNAL_INCLUDE_DIRS}) set(MODULE_INTERNAL_INCLUDE_DIRS) foreach(dir ${_include_dirs}) get_filename_component(_abs_dir ${dir} ABSOLUTE) list(APPEND MODULE_INTERNAL_INCLUDE_DIRS ${_abs_dir}) endforeach() # Qt generates headers in the binary tree list(APPEND MODULE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}) # Add the module specific include dirs include_directories(${MODULE_INCLUDE_DIRS} ${MODULE_INTERNAL_INCLUDE_DIRS}) if(NOT MODULE_EXECUTABLE) _MITK_CREATE_MODULE_CONF() endif() if(NOT MODULE_EXPORT_DEFINE) set(MODULE_EXPORT_DEFINE ${MODULE_NAME}_EXPORT) endif(NOT MODULE_EXPORT_DEFINE) if(MITK_GENERATE_MODULE_DOT) message("MODULEDOTNAME ${MODULE_NAME}") foreach(dep ${MODULE_DEPENDS}) message("MODULEDOT \"${MODULE_NAME}\" -> \"${dep}\" ; ") endforeach(dep) endif(MITK_GENERATE_MODULE_DOT) # ok, now create the module itself include(${MODULE_FILES_CMAKE}) set(module_c_flags ) set(module_c_flags_debug ) set(module_c_flags_release ) set(module_cxx_flags ) set(module_cxx_flags_debug ) set(module_cxx_flags_release ) if(MODULE_GCC_DEFAULT_VISIBILITY) set(use_visibility_flags 0) else() # We only support hidden visibility for gcc for now. Clang 3.0 still has troubles with # correctly marking template declarations and explicit template instantiations as exported. # See http://comments.gmane.org/gmane.comp.compilers.clang.scm/50028 # and http://llvm.org/bugs/show_bug.cgi?id=10113 if(CMAKE_COMPILER_IS_GNUCXX) set(use_visibility_flags 1) else() # set(use_visibility_flags 0) endif() endif() if(CMAKE_COMPILER_IS_GNUCXX) # MinGW does not export all symbols automatically, so no need to set flags. # # With gcc < 4.5, RTTI symbols from classes declared in third-party libraries # which are not "gcc visibility aware" are marked with hidden visibility in # DSOs which include the class declaration and which are compiled with # hidden visibility. This leads to dynamic_cast and exception handling problems. # While this problem could be worked around by sandwiching the include # directives for the third-party headers between "#pragma visibility push/pop" # statements, it is generally safer to just use default visibility with # gcc < 4.5. if(${GCC_VERSION} VERSION_LESS "4.5" OR MINGW) set(use_visibility_flags 0) endif() endif() if(use_visibility_flags) mitkFunctionCheckCAndCXXCompilerFlags("-fvisibility=hidden" module_c_flags module_cxx_flags) mitkFunctionCheckCAndCXXCompilerFlags("-fvisibility-inlines-hidden" module_c_flags module_cxx_flags) endif() configure_file(${MITK_SOURCE_DIR}/CMake/moduleExports.h.in ${CMAKE_BINARY_DIR}/${MODULES_CONF_DIRNAME}/${MODULE_NAME}Exports.h @ONLY) if(MODULE_WARNINGS_AS_ERRORS) if(MSVC_VERSION) mitkFunctionCheckCAndCXXCompilerFlags("/WX" module_c_flags module_cxx_flags) else() mitkFunctionCheckCAndCXXCompilerFlags("-Werror" module_c_flags module_cxx_flags) # The flag "c++0x-static-nonintegral-init" has been renamed in newer Clang # versions to "static-member-init", see # http://clang-developers.42468.n3.nabble.com/Wc-0x-static-nonintegral-init-gone-td3999651.html # # Also, older Clang and seemingly all gcc versions do not warn if unknown # "-no-*" flags are used, so CMake will happily append any -Wno-* flag to the # command line. This may get confusing if unrelated compiler errors happen and # the error output then additionally contains errors about unknown flags (which # is not the case if there were no compile errors). # # So instead of using -Wno-* we use -Wno-error=*, which will be properly rejected by # the compiler and if applicable, prints the specific warning as a real warning and # not as an error (although -Werror was given). mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=c++0x-static-nonintegral-init" module_c_flags module_cxx_flags) mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=static-member-init" module_c_flags module_cxx_flags) mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=unknown-warning" module_c_flags module_cxx_flags) mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=gnu" module_c_flags module_cxx_flags) # VNL headers throw a lot of these, not fixable for us at least in ITK 3 mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=unused-parameter" module_c_flags module_cxx_flags) # Some DICOM header file in ITK mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=cast-align" module_c_flags module_cxx_flags) endif() endif(MODULE_WARNINGS_AS_ERRORS) if(MODULE_FORCE_STATIC) set(_STATIC STATIC) else() set(_STATIC ) endif(MODULE_FORCE_STATIC) if(NOT MODULE_HEADERS_ONLY) set(MODULE_LIBNAME ${MODULE_PROVIDES}) if(NOT MODULE_NO_INIT) find_package(CppMicroServices QUIET NO_MODULE REQUIRED) if(MODULE_EXECUTABLE) usFunctionGenerateExecutableInit(CPP_FILES IDENTIFIER ${MODULE_NAME} ) else() usFunctionGenerateModuleInit(CPP_FILES NAME ${MODULE_NAME} LIBRARY_NAME ${MODULE_LIBNAME} ) endif() endif() if(RESOURCE_FILES) set(res_dir Resources) set(binary_res_files ) set(source_res_files ) foreach(res_file ${RESOURCE_FILES}) if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${res_dir}/${res_file}) list(APPEND binary_res_files "${res_file}") else() list(APPEND source_res_files "${res_file}") endif() endforeach() set(res_macro_args ) if(binary_res_files) list(APPEND res_macro_args ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${res_dir} FILES ${binary_res_files}) endif() if(source_res_files) list(APPEND res_macro_args ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${res_dir} FILES ${source_res_files}) endif() usFunctionEmbedResources(CPP_FILES LIBRARY_NAME ${MODULE_LIBNAME} ${res_macro_args}) endif() endif() # Qt 4 case if(MITK_USE_Qt4) if(UI_FILES) qt4_wrap_ui(Q${KITNAME}_GENERATED_UI_CPP ${UI_FILES}) endif() if(MOC_H_FILES) qt4_wrap_cpp(Q${KITNAME}_GENERATED_MOC_CPP ${MOC_H_FILES} OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) endif() if(QRC_FILES) qt4_add_resources(Q${KITNAME}_GENERATED_QRC_CPP ${QRC_FILES}) endif() endif() # all the same for Qt 5 if(MITK_USE_Qt5) if(UI_FILES) qt5_wrap_ui(Q${KITNAME}_GENERATED_UI_CPP ${UI_FILES}) endif() if(MOC_H_FILES) qt5_wrap_cpp(Q${KITNAME}_GENERATED_MOC_CPP ${MOC_H_FILES} OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) endif() if(QRC_FILES) qt5_add_resources(Q${KITNAME}_GENERATED_QRC_CPP ${QRC_FILES}) endif() endif() set(Q${KITNAME}_GENERATED_CPP ${Q${KITNAME}_GENERATED_CPP} ${Q${KITNAME}_GENERATED_UI_CPP} ${Q${KITNAME}_GENERATED_MOC_CPP} ${Q${KITNAME}_GENERATED_QRC_CPP}) ORGANIZE_SOURCES(SOURCE ${CPP_FILES} HEADER ${H_FILES} TXX ${TXX_FILES} DOC ${DOX_FILES} UI ${UI_FILES} QRC ${QRC_FILES} MOC ${Q${KITNAME}_GENERATED_MOC_CPP} GEN_QRC ${Q${KITNAME}_GENERATED_QRC_CPP} GEN_UI ${Q${KITNAME}_GENERATED_UI_CPP}) set(coverage_sources ${CPP_FILES} ${H_FILES} ${GLOBBED__H_FILES} ${CORRESPONDING__H_FILES} ${TXX_FILES} ${TOOL_CPPS} ${TOOL_GUI_CPPS}) if(MODULE_SUBPROJECTS) set_property(SOURCE ${coverage_sources} APPEND PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK) endif() if(NOT MODULE_HEADERS_ONLY) # We have to include the MITK__Config.cmake files here because # some external packages do not provide exported targets with an # absolute path to link to. So we need to add link directories *before* # add_library() or add_executable() is called. So far, this is needed only # for GDCM and ACVD. _link_directories_for_packages(${PACKAGE_NAMES}) if(MODULE_EXECUTABLE) add_executable(${MODULE_PROVIDES} ${coverage_sources} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${DOX_FILES} ${UI_FILES} ${QRC_FILES}) else() add_library(${MODULE_PROVIDES} ${_STATIC} ${coverage_sources} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${DOX_FILES} ${UI_FILES} ${QRC_FILES}) endif() if(MODULE_TARGET_DEPENDS) add_dependencies(${MODULE_PROVIDES} ${MODULE_TARGET_DEPENDS}) endif() if(MODULE_SUBPROJECTS) set_property(TARGET ${MODULE_PROVIDES} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK) foreach(subproject ${MODULE_SUBPROJECTS}) add_dependencies(${subproject} ${MODULE_PROVIDES}) endforeach() endif() set(DEPENDS "${MODULE_DEPENDS}") if(NOT MODULE_NO_INIT) # Add a CppMicroServices dependency implicitly, since it is # needed for the generated "module initialization" code. set(DEPENDS "CppMicroServices;${DEPENDS}") endif() if(DEPENDS OR MODULE_PACKAGE_DEPENDS) mitk_use_modules(TARGET ${MODULE_PROVIDES} MODULES ${DEPENDS} PACKAGES ${MODULE_PACKAGE_DEPENDS} ) endif() if(MINGW) target_link_libraries(${MODULE_PROVIDES} ssp) # add stack smash protection lib endif() # Apply properties to the module target. # We cannot use set_target_properties like below since there is no way to # differentiate C/C++ and Releas/Debug flags using target properties. # See http://www.cmake.org/Bug/view.php?id=6493 #set_target_properties(${MODULE_PROVIDES} PROPERTIES # COMPILE_FLAGS "${module_compile_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${module_c_flags}") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${module_c_flags_debug}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${module_c_flags_release}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${module_cxx_flags}") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${module_cxx_flags_debug}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${module_cxx_flags_release}") # Add additional library search directories to a global property which # can be evaluated by other CMake macros, e.g. our install scripts. if(MODULE_ADDITIONAL_LIBS) target_link_libraries(${MODULE_PROVIDES} ${MODULE_ADDITIONAL_LIBS}) get_property(_mitk_additional_library_search_paths GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS) foreach(_lib_filepath ${MODULE_ADDITIONAL_LIBS}) get_filename_component(_search_path "${_lib_filepath}" PATH) if(_search_path) list(APPEND _mitk_additional_library_search_paths "${_search_path}") endif() endforeach() if(_mitk_additional_library_search_paths) list(REMOVE_DUPLICATES _mitk_additional_library_search_paths) set_property(GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS ${_mitk_additional_library_search_paths}) endif() endif() # add the target name to a global property which is used in the top-level # CMakeLists.txt file to export the target set_property(GLOBAL APPEND PROPERTY MITK_MODULE_TARGETS ${MODULE_PROVIDES}) if(MODULE_AUTOLOAD_WITH) # for auto-loaded modules, adapt the output directory add_dependencies(${_module_autoload_meta_target} ${MODULE_PROVIDES}) if(WIN32) set(_module_output_prop RUNTIME_OUTPUT_DIRECTORY) else() set(_module_output_prop LIBRARY_OUTPUT_DIRECTORY) endif() set(_module_output_dir ${CMAKE_${_module_output_prop}}/${MODULE_AUTOLOAD_WITH}) get_target_property(_module_is_imported ${MODULE_AUTOLOAD_WITH} IMPORTED) if(NOT _module_is_imported) # if the auto-loading module is not imported, get its location # and put the auto-load module relative to it. get_target_property(_module_output_dir ${MODULE_AUTOLOAD_WITH} ${_module_output_prop}) set_target_properties(${MODULE_PROVIDES} PROPERTIES ${_module_output_prop} ${_module_output_dir}/${MODULE_AUTOLOAD_WITH}) else() set_target_properties(${MODULE_PROVIDES} PROPERTIES ${_module_output_prop} ${CMAKE_${_module_output_prop}}/${MODULE_AUTOLOAD_WITH}) endif() set_target_properties(${MODULE_PROVIDES} PROPERTIES MITK_AUTOLOAD_DIRECTORY ${MODULE_AUTOLOAD_WITH}) # add the auto-load module name as a property set_property(TARGET ${MODULE_AUTOLOAD_WITH} APPEND PROPERTY MITK_AUTOLOAD_TARGETS ${MODULE_PROVIDES}) endif() endif() endif() endif() endif() if(NOT MODULE_IS_ENABLED AND NOT MODULE_EXECUTABLE) _MITK_CREATE_MODULE_CONF() endif() set(MODULE_NAME ${MODULE_NAME} PARENT_SCOPE) set(MODULE_IS_ENABLED ${MODULE_IS_ENABLED} PARENT_SCOPE) endfunction() diff --git a/CMake/mitkFunctionUseModules.cmake b/CMake/mitkFunctionUseModules.cmake index 1a282c1e82..c05025287e 100644 --- a/CMake/mitkFunctionUseModules.cmake +++ b/CMake/mitkFunctionUseModules.cmake @@ -1,180 +1,180 @@ function(_mitk_parse_package_args) set(packages ${ARGN}) set(PACKAGE_NAMES ) foreach(_package ${packages}) - string(REPLACE ">" ";" _package_list ${_package}) + string(REPLACE "|" ";" _package_list ${_package}) if("${_package_list}" STREQUAL "${_package}") list(APPEND PACKAGE_NAMES ${_package}) else() list(GET _package_list 0 _package_name) list(GET _package_list 1 _package_components) if(NOT _package_name OR NOT _package_components) - message(SEND_ERROR "PACKAGE argument syntax wrong. ${_package} is not of the form PACKAGE[>COMPONENT1[|COMPONENT2]...]") + message(SEND_ERROR "PACKAGE argument syntax wrong. ${_package} is not of the form PACKAGE[|COMPONENT1[+COMPONENT2]...]") endif() list(APPEND PACKAGE_NAMES ${_package_name}) endif() endforeach() if(PACKAGE_NAMES) set(package_names_normalized ) list(REMOVE_DUPLICATES PACKAGE_NAMES) list(FIND PACKAGE_NAMES Qt4 _has_qt4_dep) list(FIND PACKAGE_NAMES Qt5 _has_qt5_dep) foreach(_package_name ${PACKAGE_NAMES}) set(${_package_name}_REQUIRED_COMPONENTS ) # Special filter for exclusive OR Qt4 / Qt5 dependency if(_package_name STREQUAL "Qt4") if(MITK_USE_Qt4) list(APPEND package_names_normalized ${_package_name}) elseif(MITK_USE_Qt5 AND _has_qt5_dep EQUAL -1) list(APPEND package_names_normalized ${_package_name}) endif() elseif(_package_name STREQUAL "Qt5") if(MITK_USE_Qt5) list(APPEND package_names_normalized ${_package_name}) elseif(MITK_USE_Qt4 AND _has_qt4_dep EQUAL -1) list(APPEND package_names_normalized ${_package_name}) endif() else() list(APPEND package_names_normalized ${_package_name}) endif() endforeach() set(PACKAGE_NAMES ${package_names_normalized}) endif() foreach(_package ${packages}) - string(REPLACE ">" ";" _package_list ${_package}) + string(REPLACE "|" ";" _package_list ${_package}) if(NOT "${_package_list}" STREQUAL "${_package}") list(GET _package_list 0 _package_name) list(GET _package_list 1 _package_components) - string(REPLACE "|" ";" _package_components_list "${_package_components}") + string(REPLACE "+" ";" _package_components_list "${_package_components}") list(APPEND ${_package_name}_REQUIRED_COMPONENTS ${_package_components_list}) endif() endforeach() foreach(_package_name ${PACKAGE_NAMES}) if(${_package_name}_REQUIRED_COMPONENTS) list(REMOVE_DUPLICATES ${_package_name}_REQUIRED_COMPONENTS) endif() set(${_package_name}_REQUIRED_COMPONENTS ${${_package_name}_REQUIRED_COMPONENTS} PARENT_SCOPE) endforeach() set(PACKAGE_NAMES ${PACKAGE_NAMES} PARENT_SCOPE) endfunction() #! This CMake function sets up the necessary include directories, #! linker dependencies, and compile flags for a given target which #! depends on a set of MITK modules or packages. #! #! A package argument is of the form #! -#! PACKAGE[>COMPONENT1[|COMPONENT2]...] +#! PACKAGE[|COMPONENT1[+COMPONENT2]...] #! #! where PACKAGE is the package name (e.g. VTK) and components are #! the names of required package components or libraries. #! #! If a dependency is not available, an error is thrown. function(mitk_use_modules) set(_macro_params TARGET # The target name (required) MODULES # MITK modules which the given TARGET uses PACKAGES # MITK packages which the given TARGET uses ) set(_macro_options ) MACRO_PARSE_ARGUMENTS(USE "${_macro_params}" "${_macro_options}" ${ARGN}) # Sanity checks if(NOT USE_TARGET) message(SEND_ERROR "Required TARGET argument missing.") elseif(NOT TARGET ${USE_TARGET}) message(SEND_ERROR "The given TARGET argument ${USE_TARGET} is not a valid target") endif() set(ALL_INCLUDE_DIRECTORIES) set(ALL_LIBRARIES) set(ALL_COMPILE_DEFINITIONS) set(ALL_META_DEPENDENCIES) set(depends ${USE_MODULES}) set(package_depends ${USE_PACKAGES}) # Get transitive MODULE and PACKAGE dependencies if(depends) set(depends_before "not initialized") while(NOT "${depends}" STREQUAL "${depends_before}") set(depends_before ${depends}) foreach(dependency ${depends}) if(NOT ${dependency}_CONFIG_FILE) message(SEND_ERROR "Missing module: ${dependency}") endif() include(${${dependency}_CONFIG_FILE}) list(APPEND package_depends ${${dependency}_PACKAGE_DEPENDS}) list(APPEND depends ${${dependency}_DEPENDS}) endforeach() list(REMOVE_DUPLICATES depends) list(SORT depends) endwhile() # Iterate over all module dependencies foreach(dependency ${depends}) if(${dependency}_IS_DEPRECATED AND NOT MODULE_IS_DEPRECATED) # Only print the message if the dependent module # is not deprecated itself and if it is a first-level dependency. list(FIND USE_MODULES ${dependency} _index) if(_index GREATER -1) message(WARNING "Module ${dependency} is deprecated since ${${dependency}_DEPRECATED_SINCE}") endif() endif() list(APPEND ALL_INCLUDE_DIRECTORIES ${${dependency}_INCLUDE_DIRS}) list(APPEND ALL_LIBRARIES ${${dependency}_PROVIDES}) if(TARGET ${dependency}-autoload) list(APPEND ALL_META_DEPENDENCIES ${dependency}-autoload) endif() endforeach() list(APPEND ALL_INCLUDE_DIRECTORIES ${MODULES_CONF_DIRS}) endif() # Parse package dependencies if(package_depends) _mitk_parse_package_args(${package_depends}) # Read all package information foreach(_package ${PACKAGE_NAMES}) set(${_package}_REQUIRED_COMPONENTS_BY_MODULE ${${_package}_REQUIRED_COMPONENTS}) set(_package_found 0) foreach(dir ${MODULES_PACKAGE_DEPENDS_DIRS}) if((NOT DEFINED MITK_USE_${_package} OR MITK_USE_${_package}) AND EXISTS "${dir}/MITK_${_package}_Config.cmake") include("${dir}/MITK_${_package}_Config.cmake") set(_package_found 1) break() endif() endforeach() if(NOT _package_found) message(SEND_ERROR "Missing package: ${_package}") endif() endforeach() endif() if(ALL_INCLUDE_DIRECTORIES) include_directories(${ALL_INCLUDE_DIRECTORIES}) endif() if(ALL_COMPILE_DEFINITIONS) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${ALL_COMPILE_DEFINITIONS}) endif() if(ALL_LIBRARIES) target_link_libraries(${USE_TARGET} ${ALL_LIBRARIES}) endif() set(ALL_INCLUDE_DIRECTORIES ${ALL_INCLUDE_DIRECTORIES} PARENT_SCOPE) set(ALL_LIBRARIES ${ALL_LIBRARIES} PARENT_SCOPE) set(ALL_META_DEPENDENCIES ${ALL_META_DEPENDENCIES} PARENT_SCOPE) endfunction() diff --git a/CMake/mitkMacroCreateModuleConf.cmake b/CMake/mitkMacroCreateModuleConf.cmake index 3070974beb..471b7af9df 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.") + 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) 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/Core/Code/CMakeLists.txt b/Core/Code/CMakeLists.txt index ec59632e28..54fffb5a78 100644 --- a/Core/Code/CMakeLists.txt +++ b/Core/Code/CMakeLists.txt @@ -1,60 +1,60 @@ set(TOOL_CPPS "") # temporary suppress warnings in the following files until image accessors are fully integrated. set_source_files_properties( DataManagement/mitkImage.cpp COMPILE_FLAGS -DMITK_NO_DEPRECATED_WARNINGS ) set_source_files_properties( Controllers/mitkSliceNavigationController.cpp COMPILE_FLAGS -DMITK_NO_DEPRECATED_WARNINGS ) # In MITK_ITK_Config.cmake, we set ITK_NO_IO_FACTORY_REGISTER_MANAGER to 1 unless # the variable is already defined. Setting it to 1 prevents multiple registrations/ # unregistrations of ITK IO factories during library loading/unloading (of MITK # libraries). However, we need "one" place where the IO factories are registered at # least once. This could be the application executable, but every executable would # need to take care of that itself. Instead, we allow the auto registration in the # Mitk Core library. set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 0) MITK_CREATE_MODULE( Mitk INCLUDE_DIRS Algorithms Common DataManagement Controllers Interactions Interfaces IO Rendering ${MITK_BINARY_DIR} INTERNAL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} DEPENDS mbilog CppMicroServices PACKAGE_DEPENDS tinyxml GDCM - ITK>ITKTransform|ITKImageGrid|ITKImageFeature|ITKTestKernel|ITKIORAW - VTK>vtkFiltersTexture|vtkFiltersParallel|vtkImagingStencil|vtkImagingMath|vtkInteractionStyle|vtkRenderingOpenGL|vtkRenderingLabel|vtkInteractionWidgets|vtkIOGeometry|vtkIOXML + ITK|ITKTransform+ITKImageGrid+ITKImageFeature+ITKTestKernel+ITKIORAW + VTK|vtkFiltersTexture+vtkFiltersParallel+vtkImagingStencil+vtkImagingMath+vtkInteractionStyle+vtkRenderingOpenGL+vtkRenderingLabel+vtkInteractionWidgets+vtkIOGeometry+vtkIOXML OpenGL EXPORT_DEFINE MITK_CORE_EXPORT WARNINGS_AS_ERRORS # Do not automatically create CppMicroServices initialization code. # Because the VTK 6 "auto-init" functionality injects file-local static # initialization code in every cpp file which includes a VTK header, # static initialization order becomes an issue again. For the Mitk # core library, we need to ensure that the VTK static initialization stuff # happens before the CppMicroServices initialization, since the latter # might already use VTK code which needs to access VTK object factories. # Hence, CppMicroServices initialization code is placed manually within # the mitkCoreActivator.cpp file. NO_INIT ) # this is needed for libraries which link to Mitk and need # symbols from explicitly instantiated templates if(MINGW) get_target_property(_mitkCore_MINGW_linkflags Mitk LINK_FLAGS) if(NOT _mitkCore_MINGW_linkflags) set(_mitkCore_MINGW_linkflags "") endif(NOT _mitkCore_MINGW_linkflags) set_target_properties(Mitk PROPERTIES LINK_FLAGS "${_mitkCore_MINGW_linkflags} -Wl,--export-all-symbols") endif(MINGW) if(MSVC_IDE OR MSVC_VERSION OR MINGW) target_link_libraries(Mitk psapi.lib) endif(MSVC_IDE OR MSVC_VERSION OR MINGW) # build tests? if(BUILD_TESTING) add_subdirectory(TestingHelper) add_subdirectory(Testing) ENDIF() diff --git a/Core/Code/TestingHelper/CMakeLists.txt b/Core/Code/TestingHelper/CMakeLists.txt index 0efd4dbda5..bedc002977 100644 --- a/Core/Code/TestingHelper/CMakeLists.txt +++ b/Core/Code/TestingHelper/CMakeLists.txt @@ -1,7 +1,7 @@ mitk_create_module(MitkTestingHelper DEPENDS Mitk - PACKAGE_DEPENDS VTK>vtkTestingRendering CppUnit + PACKAGE_DEPENDS VTK|vtkTestingRendering CppUnit EXPORT_DEFINE MITK_TESTINGHELPER_EXPORT WARNINGS_AS_ERRORS ) diff --git a/Examples/Plugins/org.mitk.example.gui.regiongrowing/CMakeLists.txt b/Examples/Plugins/org.mitk.example.gui.regiongrowing/CMakeLists.txt index deb19b8040..87424d9b07 100644 --- a/Examples/Plugins/org.mitk.example.gui.regiongrowing/CMakeLists.txt +++ b/Examples/Plugins/org.mitk.example.gui.regiongrowing/CMakeLists.txt @@ -1,9 +1,9 @@ project(org_mitk_example_gui_regiongrowing) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE REGIONGROWING_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS QmitkExt - PACKAGE_DEPENDS ITK>ITKRegionGrowing + PACKAGE_DEPENDS ITK|ITKRegionGrowing NO_INSTALL ) diff --git a/Examples/Tutorial/Step6/CMakeLists.txt b/Examples/Tutorial/Step6/CMakeLists.txt index 4a900ffe92..f1a22df796 100644 --- a/Examples/Tutorial/Step6/CMakeLists.txt +++ b/Examples/Tutorial/Step6/CMakeLists.txt @@ -1,4 +1,4 @@ mitk_create_executable(Step6 DEPENDS QmitkExt - PACKAGE_DEPENDS ITK>ITKCurvatureFlow|ITKRegionGrowing + PACKAGE_DEPENDS ITK|ITKCurvatureFlow+ITKRegionGrowing ) diff --git a/Examples/Tutorial/Step7/CMakeLists.txt b/Examples/Tutorial/Step7/CMakeLists.txt index cebe0c36ae..efbcafe4fa 100644 --- a/Examples/Tutorial/Step7/CMakeLists.txt +++ b/Examples/Tutorial/Step7/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Step6) mitk_create_executable(Step7 DEPENDS QmitkExt - PACKAGE_DEPENDS ITK>ITKCurvatureFlow|ITKRegionGrowing + PACKAGE_DEPENDS ITK|ITKCurvatureFlow+ITKRegionGrowing ) diff --git a/Examples/Tutorial/Step8/CMakeLists.txt b/Examples/Tutorial/Step8/CMakeLists.txt index 6d140bff09..94491d6db9 100644 --- a/Examples/Tutorial/Step8/CMakeLists.txt +++ b/Examples/Tutorial/Step8/CMakeLists.txt @@ -1,9 +1,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../Step6 ${CMAKE_CURRENT_SOURCE_DIR}/../Step7 ) mitk_create_executable(Step8 DEPENDS QmitkExt - PACKAGE_DEPENDS ITK>ITKCurvatureFlow|ITKRegionGrowing + PACKAGE_DEPENDS ITK|ITKCurvatureFlow+ITKRegionGrowing ) diff --git a/Modules/DeformableRegistration/CMakeLists.txt b/Modules/DeformableRegistration/CMakeLists.txt index 713d889005..fa37ec8e9a 100644 --- a/Modules/DeformableRegistration/CMakeLists.txt +++ b/Modules/DeformableRegistration/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE(MitkDeformableRegistration SUBPROJECTS MITK-Registration DEPENDS Mitk MitkRigidRegistration - PACKAGE_DEPENDS ITK>ITKPDEDeformableRegistration + PACKAGE_DEPENDS ITK|ITKPDEDeformableRegistration EXPORT_DEFINE MITK_DEFORMABLEREGISTRATION_EXPORT ) add_subdirectory(Testing) diff --git a/Modules/DicomUI/CMakeLists.txt b/Modules/DicomUI/CMakeLists.txt index 0c2f24b411..6f87d27598 100644 --- a/Modules/DicomUI/CMakeLists.txt +++ b/Modules/DicomUI/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories(${CTK_INCLUDE_DIRS}) MITK_CREATE_MODULE(mitkDicomUI DEPENDS Mitk - PACKAGE_DEPENDS CTK Qt4>QtGui|QtSql + PACKAGE_DEPENDS CTK Qt4|QtGui+QtSql EXPORT_DEFINE MITK_DICOMUI_EXPORT ) diff --git a/Modules/DiffusionImaging/Connectomics/CMakeLists.txt b/Modules/DiffusionImaging/Connectomics/CMakeLists.txt index a9d70db50a..7faa10e9c7 100644 --- a/Modules/DiffusionImaging/Connectomics/CMakeLists.txt +++ b/Modules/DiffusionImaging/Connectomics/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE( Connectomics SUBPROJECTS MITK-DTI INCLUDE_DIRS Algorithms IODataStructures Rendering ${CMAKE_CURRENT_BINARY_DIR} DEPENDS DiffusionCore FiberTracking QmitkExt - PACKAGE_DEPENDS VTK>vtkInfovisLayout + PACKAGE_DEPENDS VTK|vtkInfovisLayout ) add_subdirectory(Testing) diff --git a/Modules/DiffusionImaging/DiffusionCore/CMakeLists.txt b/Modules/DiffusionImaging/DiffusionCore/CMakeLists.txt index 9e54a3939a..71bbd5c9d0 100644 --- a/Modules/DiffusionImaging/DiffusionCore/CMakeLists.txt +++ b/Modules/DiffusionImaging/DiffusionCore/CMakeLists.txt @@ -1,17 +1,17 @@ find_package(ITK) if(ITK_GDCM_DIR) include(${ITK_GDCM_DIR}/GDCMConfig.cmake) if(GDCM_MAJOR_VERSION EQUAL 2) add_definitions(-DGDCM2) set(ITK_USES_GDCM2 1) endif(GDCM_MAJOR_VERSION EQUAL 2) endif(ITK_GDCM_DIR) MITK_CREATE_MODULE( DiffusionCore SUBPROJECTS MITK-DTI INCLUDE_DIRS Algorithms Algorithms/Reconstruction Algorithms/Registration Algorithms/Reconstruction/MultishellProcessing DicomImport IODataStructures/DiffusionWeightedImages IODataStructures/QBallImages IODataStructures/TensorImages IODataStructures Rendering ${CMAKE_CURRENT_BINARY_DIR} DEPENDS MitkMapperExt PlanarFigure ImageExtraction SceneSerializationBase - PACKAGE_DEPENDS VTK>vtkFiltersProgrammable ITK>ITKDistanceMap|ITKRegistrationCommon|ITKLabelVoting Boost + PACKAGE_DEPENDS VTK|vtkFiltersProgrammable ITK|ITKDistanceMap+ITKRegistrationCommon+ITKLabelVoting Boost ) add_subdirectory(Testing) diff --git a/Modules/DiffusionImaging/FiberTracking/CMakeLists.txt b/Modules/DiffusionImaging/FiberTracking/CMakeLists.txt index eade0ebece..ba5a45ad0e 100644 --- a/Modules/DiffusionImaging/FiberTracking/CMakeLists.txt +++ b/Modules/DiffusionImaging/FiberTracking/CMakeLists.txt @@ -1,46 +1,46 @@ mitk_check_module_dependencies(MODULES DiffusionCore MitkGraphAlgorithms MISSING_DEPENDENCIES_VAR _missing_deps) if(NOT _missing_deps) set(lut_url http://mitk.org/download/data/FibertrackingLUT.tar.gz) set(lut_tarball ${CMAKE_CURRENT_BINARY_DIR}/FibertrackingLUT.tar.gz) message("Downloading FiberTracking LUT ${lut_url}...") file(DOWNLOAD ${lut_url} ${lut_tarball} EXPECTED_MD5 38ecb6d4a826c9ebb0f4965eb9aeee44 TIMEOUT 20 STATUS status SHOW_PROGRESS ) list(GET status 0 status_code) list(GET status 1 status_msg) if(NOT status_code EQUAL 0) message(SEND_ERROR "${status_msg} (error code ${status_code})") else() message("done.") endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources) message("Unpacking FiberTracking LUT tarball...") execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ../FibertrackingLUT.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources RESULT_VARIABLE result ERROR_VARIABLE err_msg) if(result) message(SEND_ERROR "Unpacking FibertrackingLUT.tar.gz failed: ${err_msg}") else() message("done.") endif() endif() MITK_CREATE_MODULE( FiberTracking SUBPROJECTS MITK-DTI INCLUDE_DIRS Algorithms Algorithms/GibbsTracking Algorithms/StochasticTracking IODataStructures IODataStructures/FiberBundleX IODataStructures/PlanarFigureComposite Interactions SignalModels Rendering ${CMAKE_CURRENT_BINARY_DIR} DEPENDS DiffusionCore MitkGraphAlgorithms - PACKAGE_DEPENDS ITK>ITKFFT + PACKAGE_DEPENDS ITK|ITKFFT ) if(MODULE_IS_ENABLED) add_subdirectory(Testing) endif() diff --git a/Modules/GPGPU/CMakeLists.txt b/Modules/GPGPU/CMakeLists.txt index 60eb3e3ed7..e6c99ff724 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 ${package_deps} GLEW Qt4>QtGui + PACKAGE_DEPENDS ${package_deps} GLEW Qt4|QtGui EXPORT_DEFINE GPGPU_DLL_API WARNINGS_AS_ERRORS ) endif(APPLE) diff --git a/Modules/IGT/CMakeLists.txt b/Modules/IGT/CMakeLists.txt index dda2083b9b..29fdac91b2 100644 --- a/Modules/IGT/CMakeLists.txt +++ b/Modules/IGT/CMakeLists.txt @@ -1,50 +1,50 @@ include(MITKIGTHardware.cmake) if(MITK_USE_MICRON_TRACKER) set(INCLUDE_DIRS_INTERNAL ${INCLUDE_DIRS_INTERNAL} ${MITK_MICRON_TRACKER_INCLUDE_DIR}) set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${MITK_MICRON_TRACKER_LIB}) endif(MITK_USE_MICRON_TRACKER) if(MITK_USE_MICROBIRD_TRACKER) set(INCLUDE_DIRS_INTERNAL ${INCLUDE_DIRS_INTERNAL} ${MITK_USE_MICROBIRD_TRACKER_INCLUDE_DIR}) set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${MITK_USE_MICROBIRD_TRACKER_LIB}) endif(MITK_USE_MICROBIRD_TRACKER) MITK_CREATE_MODULE(MitkIGT SUBPROJECTS MITK-IGT INCLUDE_DIRS Algorithms Common DataManagement ExceptionHandling IO Rendering TrackingDevices INTERNAL_INCLUDE_DIRS ${INCLUDE_DIRS_INTERNAL} DEPENDS Mitk ImageStatistics SceneSerialization MitkIGTBase - PACKAGE_DEPENDS ITK>ITKRegistrationCommon tinyxml + PACKAGE_DEPENDS ITK|ITKRegistrationCommon tinyxml ADDITIONAL_LIBS "${ADDITIONAL_LIBS}" WARNINGS_AS_ERRORS ) if(MitkIGT_IS_ENABLED) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/ClaronMicron.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/IntuitiveDaVinci.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAurora.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAurora_Dome.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAuroraCompactFG_Dome.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAuroraPlanarFG_Dome.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAuroraTabletopFG_Dome.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIAuroraTabletopFG_Prototype_Dome.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIPolarisOldModel.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIPolarisSpectra.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIPolarisSpectraExtendedPyramid.stl ) MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/Resources/NDIPolarisVicra.stl ) endif() if(NOT MODULE_IS_ENABLED) message(STATUS "IGTTutorialStep1 won't be built. Missing: ${_RESULT}") else() ## create IGT config configure_file(mitkIGTConfig.h.in ${PROJECT_BINARY_DIR}/mitkIGTConfig.h @ONLY) # add test programm for serial communication classADD_EXECUTABLE(SerialCommunicationTest IGTTrackingDevices/mitkSerialCommunicationTest.cpp)target_link_libraries(SerialCommunicationTest mitkIGT Mitk tinyxml PocoXML) add_subdirectory(Tutorial) add_subdirectory(Testing) endif() diff --git a/Modules/ImageStatistics/CMakeLists.txt b/Modules/ImageStatistics/CMakeLists.txt index 92681cdbb9..262e5e74f0 100644 --- a/Modules/ImageStatistics/CMakeLists.txt +++ b/Modules/ImageStatistics/CMakeLists.txt @@ -1,11 +1,11 @@ MITK_CREATE_MODULE( ImageStatistics DEPENDS ImageExtraction PlanarFigure - PACKAGE_DEPENDS ITK>ITKVTK + PACKAGE_DEPENDS ITK|ITKVTK WARNINGS_AS_ERRORS ) if(BUILD_TESTING) add_subdirectory(Testing) endif(BUILD_TESTING) diff --git a/Modules/MitkAlgorithmsExt/CMakeLists.txt b/Modules/MitkAlgorithmsExt/CMakeLists.txt index e2c520aa4c..04a6db62e4 100644 --- a/Modules/MitkAlgorithmsExt/CMakeLists.txt +++ b/Modules/MitkAlgorithmsExt/CMakeLists.txt @@ -1,9 +1,9 @@ MITK_CREATE_MODULE(MitkAlgorithmsExt DEPENDS MitkDataTypesExt - PACKAGE_DEPENDS ITK>ITKThresholding ANN + PACKAGE_DEPENDS ITK|ITKThresholding ANN WARNINGS_AS_ERRORS ) if(BUILD_TESTING) add_subdirectory(Testing) endif() diff --git a/Modules/MitkExt/CMakeLists.txt b/Modules/MitkExt/CMakeLists.txt index c8ad0522a8..9e32bce663 100644 --- a/Modules/MitkExt/CMakeLists.txt +++ b/Modules/MitkExt/CMakeLists.txt @@ -1,19 +1,19 @@ #if(WIN32) # option(MITK_USE_TD_MOUSE "Enable support for 3D Connexion SpaceNavigator" OFF) #endif(WIN32) configure_file(${PROJECT_SOURCE_DIR}/CMake/ToolExtensionITKFactory.cpp.in ${PROJECT_BINARY_DIR}/ToolExtensionITKFactory.cpp.in COPYONLY) configure_file(${PROJECT_SOURCE_DIR}/CMake/ToolExtensionITKFactoryLoader.cpp.in ${PROJECT_BINARY_DIR}/ToolExtensionITKFactoryLoader.cpp.in COPYONLY) configure_file(${PROJECT_SOURCE_DIR}/CMake/ToolGUIExtensionITKFactory.cpp.in ${PROJECT_BINARY_DIR}/ToolGUIExtensionITKFactory.cpp.in COPYONLY) MITK_CREATE_MODULE( MitkExt INCLUDE_DIRS Algorithms Controllers DataManagement Interactions IO Rendering DEPENDS MitkDataTypesExt ImageExtraction IpPicSupport - PACKAGE_DEPENDS ANN ITK>ITKConnectedComponents|ITKBinaryMathematicalMorphology + PACKAGE_DEPENDS ANN ITK|ITKConnectedComponents+ITKBinaryMathematicalMorphology DEPRECATED_SINCE 2014.03 ) if(BUILD_TESTING) add_subdirectory(Testing) endif() diff --git a/Modules/MitkMapperExt/CMakeLists.txt b/Modules/MitkMapperExt/CMakeLists.txt index 84903014fa..4a4e3f9e07 100644 --- a/Modules/MitkMapperExt/CMakeLists.txt +++ b/Modules/MitkMapperExt/CMakeLists.txt @@ -1,9 +1,9 @@ MITK_CREATE_MODULE(MitkMapperExt DEPENDS MitkDataTypesExt - PACKAGE_DEPENDS VTK>vtkRenderingVolumeOpenGL + PACKAGE_DEPENDS VTK|vtkRenderingVolumeOpenGL WARNINGS_AS_ERRORS ) if(BUILD_TESTING) #add_subdirectory(Testing) endif() diff --git a/Modules/OpenCVVideoSupport/CMakeLists.txt b/Modules/OpenCVVideoSupport/CMakeLists.txt index d678a22119..b2b80affa9 100644 --- a/Modules/OpenCVVideoSupport/CMakeLists.txt +++ b/Modules/OpenCVVideoSupport/CMakeLists.txt @@ -1,24 +1,24 @@ if(MITK_USE_OpenCV) - set(dependencies ITK>ITKVideoBridgeOpenCV OpenCV) + set(dependencies ITK|ITKVideoBridgeOpenCV OpenCV) if(MITK_USE_videoInput) set(dependencies ${dependencies} videoInput) endif(MITK_USE_videoInput) MITK_CREATE_MODULE(mitkOpenCVVideoSupport INCLUDE_DIRS Commands DEPENDS MitkAlgorithmsExt PACKAGE_DEPENDS ${dependencies} ADDITIONAL_LIBS ${OPENCVVIDEOSUPPORT_ADDITIONAL_LIBS} EXPORT_DEFINE MITK_OPENCVVIDEOSUPPORT_EXPORT ) if(MITK_USE_QT) add_subdirectory(UI) endif(MITK_USE_QT) if(BUILD_TESTING) add_subdirectory(Testing) endif(BUILD_TESTING) endif(MITK_USE_OpenCV) diff --git a/Modules/OpenViewCore/CMakeLists.txt b/Modules/OpenViewCore/CMakeLists.txt index 5296787a3a..dd6c57283c 100644 --- a/Modules/OpenViewCore/CMakeLists.txt +++ b/Modules/OpenViewCore/CMakeLists.txt @@ -1,5 +1,5 @@ MITK_CREATE_MODULE(OpenViewCore - PACKAGE_DEPENDS Qt5>Core|Quick VTK OpenGL + PACKAGE_DEPENDS Qt5|Core+Quick VTK OpenGL EXPORT_DEFINE OVCORE_EXPORT ) diff --git a/Modules/Qmitk/CMakeLists.txt b/Modules/Qmitk/CMakeLists.txt index af33055204..11a87bab9e 100644 --- a/Modules/Qmitk/CMakeLists.txt +++ b/Modules/Qmitk/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE( Qmitk DEPENDS Mitk PlanarFigure - PACKAGE_DEPENDS VTK>vtkGUISupportQt Qt4>QtGui + PACKAGE_DEPENDS VTK|vtkGUISupportQt Qt4|QtGui SUBPROJECTS MITK-CoreUI EXPORT_DEFINE QMITK_EXPORT ) add_subdirectory(Testing) diff --git a/Modules/QmitkExt/CMakeLists.txt b/Modules/QmitkExt/CMakeLists.txt index 0eba53165d..037f5d0078 100644 --- a/Modules/QmitkExt/CMakeLists.txt +++ b/Modules/QmitkExt/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories(${CTK_INCLUDE_DIRS}) MITK_CREATE_MODULE( QmitkExt INCLUDE_DIRS QmitkApplicationBase QmitkPropertyObservers QmitkFunctionalityComponents DEPENDS MitkAlgorithmsExt Qmitk - PACKAGE_DEPENDS Qt4>QtWebKit Qwt Qxt + PACKAGE_DEPENDS Qt4|QtWebKit Qwt Qxt ) diff --git a/Modules/QmlMitk/CMakeLists.txt b/Modules/QmlMitk/CMakeLists.txt index 91aa95c5e9..9a4aaf4931 100644 --- a/Modules/QmlMitk/CMakeLists.txt +++ b/Modules/QmlMitk/CMakeLists.txt @@ -1,5 +1,5 @@ MITK_CREATE_MODULE(QmlMitk INCLUDE_DIRS InteractionLegacy DEPENDS Mitk OpenViewCore - PACKAGE_DEPENDS Qt5>Quick + PACKAGE_DEPENDS Qt5|Quick ) diff --git a/Modules/Qt4Qt5TestModule/CMakeLists.txt b/Modules/Qt4Qt5TestModule/CMakeLists.txt index ca6135f4df..a2466a17de 100644 --- a/Modules/Qt4Qt5TestModule/CMakeLists.txt +++ b/Modules/Qt4Qt5TestModule/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE(Qt4Qt5TestModule - PACKAGE_DEPENDS Qt4>QtCore Qt5>Core + PACKAGE_DEPENDS Qt4|QtCore Qt5|Core SUBPROJECTS MITK-CoreUI WARNINGS_AS_ERRORS ) add_subdirectory(Testing) diff --git a/Modules/Remeshing/CMakeLists.txt b/Modules/Remeshing/CMakeLists.txt index 334f990354..5cbffd6d3d 100644 --- a/Modules/Remeshing/CMakeLists.txt +++ b/Modules/Remeshing/CMakeLists.txt @@ -1,8 +1,8 @@ if(MITK_USE_ACVD) MITK_CREATE_MODULE(Remeshing DEPENDS Mitk - PACKAGE_DEPENDS ACVD VTK>vtkIOPLY|vtkIOMINC + PACKAGE_DEPENDS ACVD VTK|vtkIOPLY+vtkIOMINC ) add_subdirectory(Testing) endif() diff --git a/Modules/RigidRegistration/CMakeLists.txt b/Modules/RigidRegistration/CMakeLists.txt index e5997507ca..563a9a2047 100644 --- a/Modules/RigidRegistration/CMakeLists.txt +++ b/Modules/RigidRegistration/CMakeLists.txt @@ -1,8 +1,8 @@ MITK_CREATE_MODULE(MitkRigidRegistration SUBPROJECTS MITK-Registration DEPENDS Mitk - PACKAGE_DEPENDS ITK>ITKRegistrationCommon + PACKAGE_DEPENDS ITK|ITKRegistrationCommon EXPORT_DEFINE MITK_RIGIDREGISTRATION_EXPORT ) add_subdirectory(Testing) diff --git a/Modules/Segmentation/CMakeLists.txt b/Modules/Segmentation/CMakeLists.txt index 3e735781d2..5e103aca44 100644 --- a/Modules/Segmentation/CMakeLists.txt +++ b/Modules/Segmentation/CMakeLists.txt @@ -1,7 +1,7 @@ MITK_CREATE_MODULE(Segmentation INCLUDE_DIRS Algorithms Controllers DataManagement Interactions IO Rendering SegmentationUtilities/BooleanOperations SegmentationUtilities/MorphologicalOperations DEPENDS MitkAlgorithmsExt ipSegmentation mitkIpFunc LegacyAdaptors SurfaceInterpolation MitkGraphAlgorithms ContourModel - PACKAGE_DEPENDS ITK>ITKBinaryMathematicalMorphology|ITKLabelVoting|ITKRegionGrowing|ITKFastMarching|ITKAnisotropicSmoothing|ITKWatersheds + PACKAGE_DEPENDS ITK|ITKBinaryMathematicalMorphology+ITKLabelVoting+ITKRegionGrowing+ITKFastMarching+ITKAnisotropicSmoothing+ITKWatersheds ) add_subdirectory(Testing) diff --git a/Plugins/org.mitk.gui.qt.basicimageprocessing/CMakeLists.txt b/Plugins/org.mitk.gui.qt.basicimageprocessing/CMakeLists.txt index 4241199834..4bd38e9904 100644 --- a/Plugins/org.mitk.gui.qt.basicimageprocessing/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.basicimageprocessing/CMakeLists.txt @@ -1,11 +1,11 @@ #MACRO_CREATE_MITK_PLUGIN(QmitkExt) project(org_mitk_gui_qt_basicimageprocessing) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE BASICIMAGEPROCESSING_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS QmitkExt MitkMapperExt - PACKAGE_DEPENDS ITK>ITKMathematicalMorphology + PACKAGE_DEPENDS ITK|ITKMathematicalMorphology ) diff --git a/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt b/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt index 0b92480228..35b9f0e768 100644 --- a/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt @@ -1,8 +1,8 @@ project(org_mitk_gui_qt_cmdlinemodules) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE CLI_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS QmitkExt - PACKAGE_DEPENDS CTK Qt4>QtUiTools + PACKAGE_DEPENDS CTK Qt4|QtUiTools ) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/CMakeLists.txt b/Plugins/org.mitk.gui.qt.diffusionimaging/CMakeLists.txt index d9209a1716..b85163e26c 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/CMakeLists.txt @@ -1,8 +1,8 @@ project(org_mitk_gui_qt_diffusionimaging) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE DIFFUSIONIMAGING_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS QmitkExt Connectomics FiberTracking DiffusionCore Quantification - PACKAGE_DEPENDS ITK>ITKDiffusionTensorImage + PACKAGE_DEPENDS ITK|ITKDiffusionTensorImage ) diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt b/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt index 2a74e0d53f..96e4c01732 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt @@ -1,11 +1,11 @@ # The project name must correspond to the directory name of your plug-in # and must not contain periods. project(org_mitk_gui_qt_diffusionimagingapp) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE DIFFUSIONIMAGING_APP_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS Qmitk SceneSerialization - PACKAGE_DEPENDS Qt4>QtWebKit + PACKAGE_DEPENDS Qt4|QtWebKit ) diff --git a/Plugins/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt b/Plugins/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt index 2908a91dc1..ca9bb7528b 100644 --- a/Plugins/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt @@ -1,11 +1,11 @@ # The project name must correspond to the directory name of your plug-in # and must not contain periods. project(org_mitk_gui_qt_dtiatlasapp) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE DTIATLAS_APP_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS Qmitk SceneSerialization - PACKAGE_DEPENDS Qt4>QtWebKit + PACKAGE_DEPENDS Qt4|QtWebKit ) diff --git a/Plugins/org.mitk.gui.qt.extapplication/CMakeLists.txt b/Plugins/org.mitk.gui.qt.extapplication/CMakeLists.txt index f090f401cd..000f5999ca 100644 --- a/Plugins/org.mitk.gui.qt.extapplication/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.extapplication/CMakeLists.txt @@ -1,8 +1,8 @@ project(org_mitk_gui_qt_extapplication) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE MITK_QT_EXTAPP EXPORTED_INCLUDE_SUFFIXES src - PACKAGE_DEPENDS Qt4>QtWebKit + PACKAGE_DEPENDS Qt4|QtWebKit ) diff --git a/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt b/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt index d81f06050c..96a4eb3fa3 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt @@ -1,10 +1,10 @@ # The project name must correspond to the directory name of your plug-in # and must not contain periods. project(org_mitk_gui_qt_moviemaker) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE MOVIEMAKER_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS QmitkExt - PACKAGE_DEPENDS VTK>vtkTestingCore + PACKAGE_DEPENDS VTK|vtkTestingCore ) diff --git a/Utilities/qtsingleapplication/CMakeLists.txt b/Utilities/qtsingleapplication/CMakeLists.txt index d48468e504..e5dc6daa27 100644 --- a/Utilities/qtsingleapplication/CMakeLists.txt +++ b/Utilities/qtsingleapplication/CMakeLists.txt @@ -1,38 +1,38 @@ if(MITK_USE_Qt4) # only if MITK is built with Qt 4 project(QtSingleApplication) set(_MOC_HEADERS qtlocalpeer.h qtsingleapplication.h qtsinglecoreapplication.h ) set(_HEADERS qthandlenewappinstance.h qtlockedfile.h ) set(_SOURCES qthandlenewappinstance.cpp qtlocalpeer.cpp qtsingleapplication.cpp qtsinglecoreapplication.cpp ) find_package(Qt4 REQUIRED) set(QT_USE_QTNETWORK 1) include(${QT_USE_FILE}) qt4_wrap_cpp(_SOURCES ${_MOC_HEADERS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_library(qtsingleapplication STATIC ${_SOURCES}) target_link_libraries(qtsingleapplication ${QT_LIBRARIES}) MITK_CREATE_MODULE_CONF(qtsingleapplication INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} - PACKAGE_DEPENDS Qt4>QtNetwork|QtGui) + PACKAGE_DEPENDS Qt4|QtNetwork+QtGui) endif(MITK_USE_Qt4) # only if MITK is built with Qt 4