Mercurial > hg > orthanc-object-storage
annotate Google/CMakeLists.txt @ 20:968eb1c78aed
Added 'RootPath' configuration
author | Alain Mazy |
---|---|
date | Mon, 07 Sep 2020 14:12:49 +0200 |
parents | 44de9edf2443 |
children | b77be39e25a5 e568ca940ddd 319d41a22de4 |
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") | |
15 | 10 set(ORTHANC_FRAMEWORK_VERSION "1.7.3" 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) | |
20 | |
15 | 21 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
|
22 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
1 | 23 |
24 | |
25 add_definitions( | |
26 -DHAS_ORTHANC_EXCEPTION=1 | |
15 | 27 -DORTHANC_ENABLE_LOGGING=1 |
1 | 28 -DGOOGLE_STORAGE_PLUGIN=1 |
29 ) | |
30 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}") | |
31 | |
32 include_directories( | |
15 | 33 ${ORTHANC_FRAMEWORK_ROOT} |
34 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include | |
35 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common | |
1 | 36 ) |
37 | |
38 find_package(CURL REQUIRED) | |
39 find_package(storage_client REQUIRED) | |
40 find_package(cryptopp CONFIG REQUIRED) | |
41 | |
42 set(COMMON_SOURCES | |
43 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h | |
15 | 44 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h |
45 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp | |
1 | 46 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp |
47 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h | |
48 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp | |
49 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h | |
15 | 50 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
1 | 51 |
52 ${ORTHANC_CORE_SOURCES} | |
53 ) | |
54 | |
55 add_library(OrthancGoogleCloudStorage SHARED | |
56 GoogleStoragePlugin.cpp | |
57 GoogleStoragePlugin.h | |
58 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp | |
59 | |
60 ${COMMON_SOURCES} | |
61 ) | |
62 | |
63 set_target_properties(OrthancGoogleCloudStorage PROPERTIES | |
64 VERSION ${PLUGIN_VERSION} | |
65 SOVERSION ${PLUGIN_VERSION} | |
66 ) | |
67 | |
68 target_link_libraries(OrthancGoogleCloudStorage | |
69 PRIVATE | |
70 storage_client | |
71 cryptopp-static | |
72 ) | |
73 | |
74 add_executable(UnitTests | |
75 ${GOOGLE_TEST_SOURCES} | |
76 ${COMMON_SOURCES} | |
77 | |
78 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp | |
79 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp | |
80 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsGcsClient.cpp | |
81 ) | |
82 | |
83 target_link_libraries(UnitTests | |
84 PRIVATE | |
85 cryptopp-static | |
86 storage_client | |
87 ${GOOGLE_TEST_LIBRARIES} | |
88 ) |