comparison CMakeLists.txt @ 275:3a9749b1dfce

link against system-wide Orthanc Framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jul 2020 11:31:08 +0200
parents 52b56343d268
children 1d360b822973
comparison
equal deleted inserted replaced
274:52b56343d268 275:3a9749b1dfce
50 50
51 # Download and setup the Orthanc framework 51 # Download and setup the Orthanc framework
52 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") 52 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
53 set(ENABLE_GOOGLE_TEST ON) 53 set(ENABLE_GOOGLE_TEST ON)
54 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) 54 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake)
55 link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES})
55 56
56 include_directories( 57 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
57 ${CMAKE_SOURCE_DIR}/Resources/Orthanc/ 58 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
58 ) 59 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
59 link_libraries(OrthancFramework) 60 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
60 else() 61 else()
61 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) 62 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake)
62 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) 63 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
63 64
64 set(ENABLE_LOCALE OFF) # Disable support for locales (notably in Boost) 65 set(ENABLE_LOCALE OFF) # Disable support for locales (notably in Boost)
152 ${CMAKE_SOURCE_DIR}/Plugin/SeriesInformationAdapter.cpp 153 ${CMAKE_SOURCE_DIR}/Plugin/SeriesInformationAdapter.cpp
153 154
154 ${ORTHANC_CORE_SOURCES} 155 ${ORTHANC_CORE_SOURCES}
155 ) 156 )
156 157
157 include_directories(
158 ${CMAKE_SOURCE_DIR}/Resources/Orthanc/Plugins/
159 )
160
161 add_library(OrthancWebViewer 158 add_library(OrthancWebViewer
162 SHARED 159 SHARED
163 ${AUTOGENERATED_SOURCES} 160 ${AUTOGENERATED_SOURCES}
164 ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp 161 ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp
165 ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp 162 ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp