diff --git a/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake b/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake index bcd24d2818..b7eb0f59ed 100644 --- a/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake +++ b/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake @@ -1,107 +1,108 @@ #! #! Create a Command Line App. #! #! \brief This function will create a command line executable and the scripts required to run it #! #! \param NAME (required) Name of the algorithm / cmake target #! \param DEPENDS (optional) Required MITK modules beyond MitkCommandLine #! \param PACKAGE_DEPENDS (optional) list of "packages" this command line app depends on (e.g. ITK, VTK, etc.) #! \param CPP_FILES (optional) list of cpp files, if it is not given NAME.cpp is assumed #! \param INCLUDE_DIRS (optional): All directories that should be added as include dirs to the project #! \param PROFILE (optional): The profile file that should be used for the algorithm. If not set it is "./.profile". #! \param NO_PROFILE_GEN (optional): Flag. If set no profile resource will be generated. #! \param ADDITIONAL_LIBS (optional) List of additional private libraries linked to this module. #! The folder containing the library will be added to the global list of library search paths. #! \param H_FILES (optional) List of public header files for this module. #! Assuming that there exists a file called MyApp.cpp, an example call looks like: #! \code #! mitkFunctionCreateCommandLineApp( #! NAME MyApp #! DEPENDS MitkCore MitkPlanarFigure #! PACKAGE_DEPENDS ITK VTK #! ) #! \endcode #! function(mitkFunctionCreateMatchPointDeployedAlgorithm) set(_function_params NAME # Name of the algorithm/target PROFILE # Profile of the algorithm that should be used ) set(_function_multiparams DEPENDS # list of modules this command line app depends on PACKAGE_DEPENDS # list of "packages" this command line app depends on (e.g. ITK, VTK, etc.) CPP_FILES # (optional) list of cpp files, if it is not given NAME.cpp is assumed INCLUDE_DIRS # include directories: [PUBLIC|PRIVATE|INTERFACE] ADDITIONAL_LIBS # list of addidtional private libraries linked to this module. H_FILES # list of header files: [PUBLIC|PRIVATE] ) set(_function_options NO_PROFILE_GEN #Flag that indicates that no profile resource should be generated. ) cmake_parse_arguments(ALG "${_function_options}" "${_function_params}" "${_function_multiparams}" ${ARGN}) if( NOT (DEFINED MITK_USE_MatchPoint) OR NOT (${MITK_USE_MatchPoint})) message(FATAL_ERROR "Need package Matchpoint to deploy MatchPoint Algorithms.") endif() if(NOT ALG_NAME) message(FATAL_ERROR "NAME argument cannot be empty.") endif() SET(ALG_TARGET "MDRA_${ALG_NAME}") if(NOT ALG_CPP_FILES) set(ALG_CPP_FILES "${ALG_NAME}.cpp") endif() IF(NOT ALG_PROFILE) set(ALG_PROFILE "${ALG_NAME}.profile") ENDIF(NOT ALG_PROFILE) IF(NOT ALG_NO_PROFILE_GEN) MESSAGE(STATUS "... generate MDRA profile for ${ALG_NAME} (from ${ALG_PROFILE})...") include(${MatchPoint_SOURCE_DIR}/CMake/mapFunctionCreateAlgorithmProfile.cmake) CREATE_ALGORITHM_PROFILE(${ALG_NAME} ${ALG_PROFILE}) MESSAGE(STATUS "... algorithm UID: ${ALGORITHM_PROFILE_UID}") ENDIF(NOT ALG_NO_PROFILE_GEN) MESSAGE(STATUS "... deploy MDRA algorithm ${ALG_NAME}...") ADD_LIBRARY(${ALG_TARGET} SHARED ${ALG_CPP_FILES} ${ALGORITHM_PROFILE_FILE}) SET_TARGET_PROPERTIES(${ALG_TARGET} PROPERTIES OUTPUT_NAME "mdra-${MatchPoint_VERSION_MAJOR}-${MatchPoint_VERSION_MINOR}_${ALG_NAME}" OUTPUT_NAME_DEBUG "mdra-D-${MatchPoint_VERSION_MAJOR}-${MatchPoint_VERSION_MINOR}_${ALG_NAME}" - PREFIX "" ) + PREFIX "" + FOLDER "${MITK_ROOT_FOLDER}/MatchPointAlgorithms") mitk_use_modules(TARGET ${ALG_TARGET} MODULES ${ALG_DEPENDS} PACKAGES PRIVATE ITK MatchPoint ${ALG_PACKAGE_DEPENDS} ) target_include_directories(${ALG_TARGET} PRIVATE ${ALG_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) if(ALG_ADDITIONAL_LIBS) target_link_libraries(${ALG_TARGET} PRIVATE ${ALG_ADDITIONAL_LIBS}) get_property(_mitk_additional_library_search_paths GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS) foreach(_lib_filepath ${ALG_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() MITK_INSTALL(TARGETS ${ALG_TARGET}) endfunction() diff --git a/Modules/DICOMTesting/CMakeLists.txt b/Modules/DICOMTesting/CMakeLists.txt index 316862f7f6..69d2fcb943 100644 --- a/Modules/DICOMTesting/CMakeLists.txt +++ b/Modules/DICOMTesting/CMakeLists.txt @@ -1,41 +1,41 @@ if(BUILD_TESTING) if(GDCM_DIR) # clear variables from prior files.cmake # Else CMake would use the content of these variables and would try to create tests (which are not present in DICOMTesting). set(MODULE_TESTS) set(MODULE_IMAGE_TESTS) set(MODULE_SURFACE_TESTS) set(MODULE_TESTIMAGE) set(MODULE_TESTSURFACE) set(MODULE_CUSTOM_TESTS) set(H_FILES) set(CPP_FILES) # now create a new module only for testing purposes MITK_CREATE_MODULE( DEPENDS MitkDICOMReader ) mitk_check_module_dependencies(MODULES MitkDICOMTesting MISSING_DEPENDENCIES_VAR _missing_deps) if(_missing_deps) message(STATUS "mitkDICOMTesting module helper applications won't be built. Missing: ${_missing_deps}") else(_missing_deps) # dumps out image information add_executable(DumpDICOMMitkImage src/DumpDICOMMitkImage.cpp) mitk_use_modules(TARGET DumpDICOMMitkImage MODULES MitkDICOMTesting) # compares dumped out image information against reference dump add_executable(VerifyDICOMMitkImageDump src/VerifyDICOMMitkImageDump.cpp) mitk_use_modules(TARGET VerifyDICOMMitkImageDump MODULES MitkDICOMTesting) set_property(TARGET DumpDICOMMitkImage VerifyDICOMMitkImageDump PROPERTY FOLDER - "${MITK_ROOT_FOLDER}/Modules/CommandLineApps") + "${MITK_ROOT_FOLDER}/Modules/Tests") add_subdirectory(test) endif() endif() endif() diff --git a/Modules/IGT/Tutorial/CMakeLists.txt b/Modules/IGT/Tutorial/CMakeLists.txt index 48aebac2a7..be73dce7cc 100644 --- a/Modules/IGT/Tutorial/CMakeLists.txt +++ b/Modules/IGT/Tutorial/CMakeLists.txt @@ -1,5 +1,7 @@ add_executable(MitkIGTTutorialStep1 mitkIGTTutorialStep1.cpp) mitk_use_modules(TARGET MitkIGTTutorialStep1 MODULES MitkIGT MitkDataTypesExt) add_executable(MitkIGTTutorialStep2 mitkIGTTutorialStep2.cpp) mitk_use_modules(TARGET MitkIGTTutorialStep2 MODULES MitkIGT MitkDataTypesExt) + +set_property(TARGET MitkIGTTutorialStep1 MitkIGTTutorialStep2 PROPERTY "${MITK_ROOT_FOLDER}/Modules/Executables") diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt index c757046536..aa75bca1ba 100644 --- a/Wrapping/CMakeLists.txt +++ b/Wrapping/CMakeLists.txt @@ -1,70 +1,71 @@ find_package(SWIG QUIET) if(SWIG_FOUND) include(mitkLanguageOptions) include(UseSWIG) include(mitkSwigAddLibraryDependencies) include(mitkSwigPrepareFiles) # Path to common files set(MITK_WRAPPING_COMMON_DIR ${MITK_SOURCE_DIR}/Wrapping/Common) # make a manual list of dependencies for the Swig.i files list( APPEND SWIG_EXTRA_DEPS "${MITK_WRAPPING_COMMON_DIR}/MITK_Common.i" ) # A general packaging target, not built by default, to build packages for each # language. This should depend on all language specific targets. add_custom_target( dist ${CMAKE_COMMAND} -E echo "Finished generating wrapped packages for distribution..." ) + set_property(TARGET dist PROPERTY FOLDER "${MITK_ROOT_FOLDER}/Wrapping") # # lua SWIG configuration # #if ( WRAP_LUA ) # add_subdirectory ( Lua ) #endif() # # python SWIG configuration # if ( WRAP_PYTHON ) add_subdirectory ( Python ) endif() # # ruby SWIG configuration # #if ( WRAP_RUBY ) # add_subdirectory ( Ruby ) #endif() # # JAVA SWIG configuration # #if ( WRAP_JAVA ) # add_subdirectory( Java ) #endif() # # C# SWIG configuration # #if ( WRAP_CSHARP ) # add_subdirectory ( CSharp ) #endif() # # TCL SWIG configuration # #if ( WRAP_TCL ) # add_subdirectory ( Tcl ) #endif() # # R SWIG configuration # #if ( WRAP_R ) # add_subdirectory( R ) #endif() endif()