# HG changeset patch # User Sebastien Jodogne # Date 1623477657 -7200 # Node ID da73be4b361b3479072b732e67d96cb34e0e7da6 # Parent 38b0a6a1ca562debb4f58017d8c6bc57715c14fb no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to link against system-wide orthanc framework diff -r 38b0a6a1ca56 -r da73be4b361b CMakeLists.txt --- a/CMakeLists.txt Fri Jun 11 17:11:34 2021 +0200 +++ b/CMakeLists.txt Sat Jun 12 08:00:57 2021 +0200 @@ -46,12 +46,15 @@ include_directories(${ORTHANC_FRAMEWORK_ROOT}) if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") - if (NOT ORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES STREQUAL "") - # https://stackoverflow.com/a/5272993/881731 - string(REPLACE " " ";" tmp ${ORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES}) - link_libraries(${tmp}) + include(FindBoost) + find_package(Boost COMPONENTS filesystem regex thread) + + if (NOT Boost_FOUND) + message(FATAL_ERROR "Unable to locate Boost on this system") endif() - + + link_libraries(${Boost_LIBRARIES} jsoncpp) + else() include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake)