# HG changeset patch # User Sebastien Jodogne # Date 1623479205 -7200 # Node ID 35f3b72a164cb73551977d603a093169381154bd # Parent edcfed569c166837e15aabab82acf5fcc328baa5 no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework diff -r edcfed569c16 -r 35f3b72a164c CMakeLists.txt --- a/CMakeLists.txt Fri May 07 13:33:44 2021 +0200 +++ b/CMakeLists.txt Sat Jun 12 08:26:45 2021 +0200 @@ -60,8 +60,19 @@ include_directories(${ORTHANC_FRAMEWORK_ROOT}) if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + if (ORTHANC_FRAMEWORK_USE_SHARED) + include(FindBoost) + find_package(Boost COMPONENTS regex thread) + + if (NOT Boost_FOUND) + message(FATAL_ERROR "Unable to locate Boost on this system") + endif() + + link_libraries(${Boost_LIBRARIES} jsoncpp) + endif() + link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) - + set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)