Skip to content

Commit

Permalink
simplify link library to Boost
Browse files Browse the repository at this point in the history
  • Loading branch information
paskino committed May 21, 2022
1 parent f5b5ede commit db4479d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
12 changes: 1 addition & 11 deletions src/Registration/cReg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 1 addition & 11 deletions src/xGadgetron/cGadgetron/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
12 changes: 1 addition & 11 deletions src/xSTIR/cSTIR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db4479d

Please sign in to comment.