Mercurial > hg > orthanc-object-storage
annotate Google/CMakeLists.txt @ 49:6db76975d0f8
update to Orthanc Framework 1.9.2
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 23 Apr 2021 12:38:25 +0200 |
parents | 1691da4ae9c3 |
children | b40327079244 |
rev | line source |
---|---|
1 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
3 project(OrthancGoogleCloudStorage) | |
4 | |
2 | 5 set(PLUGIN_VERSION "mainline") |
1 | 6 |
7 include(CheckIncludeFileCXX) | |
8 | |
9 set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source") | |
49 | 10 set(ORTHANC_FRAMEWORK_VERSION "1.9.2" CACHE STRING "orthanc framework version") |
1 | 11 set(ALLOW_DOWNLOADS ON) |
12 | |
13 # Download and setup the Orthanc framework | |
14 include(${CMAKE_SOURCE_DIR}/../Common/Resources/DownloadOrthancFramework.cmake) | |
15 | |
15 | 16 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) |
1 | 17 |
18 set(ENABLE_GOOGLE_TEST ON) | |
19 set(ORTHANC_FRAMEWORK_PLUGIN ON) | |
22
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
20 set(ENABLE_MODULE_IMAGES OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
21 set(ENABLE_MODULE_JOBS OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
22 set(ENABLE_MODULE_DICOM OFF) |
1 | 23 |
15 | 24 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkConfiguration.cmake) |
18
44de9edf2443
fix compilation to avoid exposing internal symbols which caused a crash at Orthanc startup
Alain Mazy
parents:
15
diff
changeset
|
25 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
1 | 26 |
27 | |
28 add_definitions( | |
29 -DHAS_ORTHANC_EXCEPTION=1 | |
15 | 30 -DORTHANC_ENABLE_LOGGING=1 |
1 | 31 -DGOOGLE_STORAGE_PLUGIN=1 |
32 ) | |
33 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}") | |
34 | |
35 include_directories( | |
15 | 36 ${ORTHANC_FRAMEWORK_ROOT} |
37 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include | |
38 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common | |
1 | 39 ) |
40 | |
41 find_package(CURL REQUIRED) | |
42 find_package(storage_client REQUIRED) | |
43 find_package(cryptopp CONFIG REQUIRED) | |
44 | |
45 set(COMMON_SOURCES | |
46 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h | |
15 | 47 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h |
48 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp | |
1 | 49 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp |
50 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h | |
51 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp | |
52 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h | |
15 | 53 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
1 | 54 |
55 ${ORTHANC_CORE_SOURCES} | |
56 ) | |
57 | |
58 add_library(OrthancGoogleCloudStorage SHARED | |
59 GoogleStoragePlugin.cpp | |
60 GoogleStoragePlugin.h | |
61 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp | |
62 | |
63 ${COMMON_SOURCES} | |
64 ) | |
65 | |
66 set_target_properties(OrthancGoogleCloudStorage PROPERTIES | |
67 VERSION ${PLUGIN_VERSION} | |
68 SOVERSION ${PLUGIN_VERSION} | |
69 ) | |
70 | |
71 target_link_libraries(OrthancGoogleCloudStorage | |
72 PRIVATE | |
73 storage_client | |
74 cryptopp-static | |
75 ) | |
76 | |
77 add_executable(UnitTests | |
78 ${GOOGLE_TEST_SOURCES} | |
79 ${COMMON_SOURCES} | |
80 | |
81 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp | |
82 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp | |
83 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsGcsClient.cpp | |
84 ) | |
85 | |
86 target_link_libraries(UnitTests | |
87 PRIVATE | |
88 cryptopp-static | |
89 storage_client | |
90 ${GOOGLE_TEST_LIBRARIES} | |
91 ) |