diff --git a/src/Registration/cReg/CMakeLists.txt b/src/Registration/cReg/CMakeLists.txt index 2309bec39..8f07525ac 100644 --- a/src/Registration/cReg/CMakeLists.txt +++ b/src/Registration/cReg/CMakeLists.txt @@ -74,17 +74,7 @@ if (NIFTYREG_BUILT_WITH_OPENCL) endif() # Add boost library dependencies -if((CMAKE_VERSION VERSION_LESS 3.5.0) OR (NOT _Boost_IMPORTED_TARGETS)) - # This is harder than it should be on older CMake versions to be able to cope with - # spaces in filenames. - foreach(C SYSTEM FILESYSTEM) - target_link_libraries(Reg PUBLIC optimized "${Boost_${C}_LIBRARY_RELEASE}") - target_link_libraries(Reg PUBLIC debug "${Boost_${C}_LIBRARY_DEBUG}") - endforeach() -else() - # Nice and simple for recent CMake (which knows about your Boost version) - target_link_libraries(Reg PUBLIC Boost::system Boost::filesystem) -endif() +target_link_libraries(Reg PUBLIC Boost::system Boost::filesystem)endif() # Link Matlab for SPM IF(SPM_FOUND) diff --git a/src/xGadgetron/cGadgetron/CMakeLists.txt b/src/xGadgetron/cGadgetron/CMakeLists.txt index e2eb030d4..2948403ee 100644 --- a/src/xGadgetron/cGadgetron/CMakeLists.txt +++ b/src/xGadgetron/cGadgetron/CMakeLists.txt @@ -104,17 +104,7 @@ target_include_directories(cgadgetron PUBLIC "${ISMRMRD_INCLUDE_DIR}") target_link_libraries(cgadgetron PUBLIC iutilities csirf) # Add boost library dependencies -if((CMAKE_VERSION VERSION_LESS 3.5.0) OR (NOT _Boost_IMPORTED_TARGETS)) - # This is harder than it should be on older CMake versions to be able to cope with - # spaces in filenames. - foreach(C SYSTEM FILESYSTEM THREAD DATE_TIME CHRONO) - target_link_libraries(cgadgetron PUBLIC optimized "${Boost_${C}_LIBRARY_RELEASE}") - target_link_libraries(cgadgetron PUBLIC debug "${Boost_${C}_LIBRARY_DEBUG}") - endforeach() -else() - # Nice and simple for recent CMake (which knows about your Boost version) - target_link_libraries(cgadgetron PUBLIC Boost::system Boost::filesystem Boost::thread Boost::date_time Boost::chrono) -endif() +target_link_libraries(cgadgetron PUBLIC Boost::system Boost::filesystem Boost::thread Boost::date_time Boost::chrono) target_link_libraries(cgadgetron PUBLIC ISMRMRD::ISMRMRD) target_link_libraries(cgadgetron PUBLIC "${FFTW3_LIBRARIES}") diff --git a/src/xSTIR/cSTIR/CMakeLists.txt b/src/xSTIR/cSTIR/CMakeLists.txt index 064533292..1b6bcd28b 100644 --- a/src/xSTIR/cSTIR/CMakeLists.txt +++ b/src/xSTIR/cSTIR/CMakeLists.txt @@ -45,17 +45,7 @@ target_include_directories(cstir PUBLIC "${STIR_INCLUDE_DIRS}") target_link_libraries(cstir csirf iutilities) target_link_libraries(cstir "${STIR_LIBRARIES}") # Add boost library dependencies -if((CMAKE_VERSION VERSION_LESS 3.5.0) OR (NOT _Boost_IMPORTED_TARGETS)) - # This is harder than it should be on older CMake versions to be able to cope with - # spaces in filenames. - foreach(C SYSTEM FILESYSTEM THREAD DATE_TIME CHRONO) - target_link_libraries(cstir optimized "${Boost_${C}_LIBRARY_RELEASE}") - target_link_libraries(cstir debug "${Boost_${C}_LIBRARY_DEBUG}") - endforeach() -else() - # Nice and simple for recent CMake (which knows about your Boost version) - target_link_libraries(cstir Boost::system Boost::filesystem Boost::thread Boost::date_time Boost::chrono) -endif() +target_link_libraries(cstir Boost::system Boost::filesystem Boost::thread Boost::date_time Boost::chrono) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" COMPONENT Development