# HG changeset patch # User Sebastien Jodogne # Date 1623498222 -7200 # Node ID 5a6adbc20ace72b139fd22acbe33f42ce94fe2eb # Parent 6c252e51008d3ce729d030508a0b37d33c866ffa cleanup cmake diff -r 6c252e51008d -r 5a6adbc20ace Applications/Samples/RtViewerPlugin/CMakeLists.txt --- a/Applications/Samples/RtViewerPlugin/CMakeLists.txt Sat Jun 12 09:01:40 2021 +0200 +++ b/Applications/Samples/RtViewerPlugin/CMakeLists.txt Sat Jun 12 13:43:42 2021 +0200 @@ -54,6 +54,17 @@ include_directories(${ORTHANC_FRAMEWORK_ROOT}) if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + if (ORTHANC_FRAMEWORK_USE_SHARED) + include(FindBoost) + find_package(Boost COMPONENTS system) + + 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}) else() diff -r 6c252e51008d -r 5a6adbc20ace OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake --- a/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake Sat Jun 12 09:01:40 2021 +0200 +++ b/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake Sat Jun 12 13:43:42 2021 +0200 @@ -24,15 +24,33 @@ ##################################################################### if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") - # DCMTK and curl are necessarily enabled if using Orthanc framework: - # "DownloadOrthancFramework.cmake" must be aware of this fact - set(ENABLE_DCMTK ON) - set(ENABLE_WEB_CLIENT ON) + # DCMTK, pugixml and curl are necessarily enabled if using the + # system-wide Orthanc framework + include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake) + + if (ORTHANC_FRAMEWORK_USE_SHARED) + include(FindBoost) + find_package(Boost COMPONENTS filesystem regex thread ${ORTHANC_BOOST_COMPONENTS}) + + if (NOT Boost_FOUND) + message(FATAL_ERROR "Unable to locate Boost on this system") + endif() + + include(FindDCMTK NO_MODULE) + link_libraries(${Boost_LIBRARIES} ${DCMTK_LIBRARIES} pugixml jsoncpp) + endif() - include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake) link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) + add_definitions( + -DORTHANC_ENABLE_DCMTK=1 + -DORTHANC_ENABLE_PUGIXML=1 + ) + + set(ENABLE_DCMTK ON) set(ENABLE_LOCALE ON) + set(ENABLE_PUGIXML ON) + set(ENABLE_WEB_CLIENT ON) else() if (ENABLE_DCMTK)