diff --git a/Examples/MbiLog/CMakeLists.txt b/Examples/MbiLog/CMakeLists.txt index 7cae548865..5e501b0356 100644 --- a/Examples/MbiLog/CMakeLists.txt +++ b/Examples/MbiLog/CMakeLists.txt @@ -1,16 +1,13 @@ project(MbiLogExample) find_package(MITK REQUIRED) -MITK_USE_MODULE(Mitk) - -include_directories(${ALL_INCLUDE_DIRECTORIES}) add_executable(MitkLogExample MitkLogExample.cpp) -target_link_libraries(MitkLogExample ${ALL_LIBRARIES}) +mitk_use_modules(TARGET MitkLogExample MODULES Mitk) # subproject support set_property(TARGET MitkLogExample PROPERTY LABELS ${MITK_DEFAULT_SUBPROJECTS}) foreach(subproject ${MITK_DEFAULT_SUBPROJECTS}) add_dependencies(${subproject} MitkLogExample) endforeach() diff --git a/Examples/QtFreeRender/CMakeLists.txt b/Examples/QtFreeRender/CMakeLists.txt index 01ca0aa51d..f2b3a02228 100644 --- a/Examples/QtFreeRender/CMakeLists.txt +++ b/Examples/QtFreeRender/CMakeLists.txt @@ -1,26 +1,21 @@ project(QtFreeRender) find_package(MITK) # Check prerequisites for this application. # We need the Mitk module. MITK_CHECK_MODULE(result Mitk) if(result) message(SEND_ERROR "MITK module(s) \"${result}\" not available from the MITK build at ${MITK_DIR}") endif() -# Set-up the build system to use the Mitk module -MITK_USE_MODULE(Mitk) -include_directories(${ALL_INCLUDE_DIRECTORIES}) -link_directories(${ALL_LIBRARY_DIRS}) - usFunctionGenerateExecutableInit(init_src_file IDENTIFIER ${PROJECT_NAME}) add_executable(${PROJECT_NAME} QtFreeRender.cpp ${init_src_file}) -target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES} ) +mitk_use_modules(TARGET ${PROJECT_NAME} MODULES Mitk) # subproject support set_property(TARGET ${PROJECT_NAME} PROPERTY LABELS ${MITK_DEFAULT_SUBPROJECTS}) foreach(subproject ${MITK_DEFAULT_SUBPROJECTS}) add_dependencies(${subproject} ${PROJECT_NAME}) endforeach()