Mercurial > hg > orthanc-object-storage
annotate Google/CMakeLists.txt @ 112:f2c242a6f8ab
fix framework version
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 11 Oct 2023 09:56:22 +0200 |
parents | 2549eecdc996 |
children | 752ab0c59950 |
rev | line source |
---|---|
56
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
1 # Cloud storage plugins for Orthanc |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
2 # Copyright (C) 2020-2021 Osimis S.A., Belgium |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
3 # |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
4 # This program is free software: you can redistribute it and/or |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
5 # modify it under the terms of the GNU Affero General Public License |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
6 # as published by the Free Software Foundation, either version 3 of |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
7 # the License, or (at your option) any later version. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
8 # |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
9 # This program is distributed in the hope that it will be useful, but |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
10 # WITHOUT ANY WARRANTY; without even the implied warranty of |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
12 # Affero General Public License for more details. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
13 # |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
14 # You should have received a copy of the GNU Affero General Public License |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
16 |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
52
diff
changeset
|
17 |
109
2549eecdc996
updated minimum cmake version for Azure & Google
Alain Mazy <am@osimis.io>
parents:
108
diff
changeset
|
18 cmake_minimum_required(VERSION 3.3) |
1 | 19 |
20 project(OrthancGoogleCloudStorage) | |
21 | |
52 | 22 set(PLUGIN_VERSION "mainline") |
1 | 23 |
24 include(CheckIncludeFileCXX) | |
25 | |
26 set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source") | |
112 | 27 set(ORTHANC_FRAMEWORK_VERSION "mainline" CACHE STRING "orthanc framework version") # TODO: update to 1.12.2 when available |
1 | 28 set(ALLOW_DOWNLOADS ON) |
29 | |
30 # Download and setup the Orthanc framework | |
31 | |
59
f3c44d61e1e1
AWS S3: Support of dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
32 include(${CMAKE_SOURCE_DIR}/../Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) |
15 | 33 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) |
1 | 34 |
35 set(ENABLE_GOOGLE_TEST ON) | |
36 set(ORTHANC_FRAMEWORK_PLUGIN ON) | |
22
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
37 set(ENABLE_MODULE_IMAGES OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
38 set(ENABLE_MODULE_JOBS OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
39 set(ENABLE_MODULE_DICOM OFF) |
1 | 40 |
15 | 41 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
|
42 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
1 | 43 |
44 | |
45 add_definitions( | |
46 -DHAS_ORTHANC_EXCEPTION=1 | |
15 | 47 -DORTHANC_ENABLE_LOGGING=1 |
1 | 48 -DGOOGLE_STORAGE_PLUGIN=1 |
49 ) | |
50 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}") | |
51 | |
52 include_directories( | |
15 | 53 ${ORTHANC_FRAMEWORK_ROOT} |
54 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include | |
55 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common | |
1 | 56 ) |
57 | |
58 find_package(CURL REQUIRED) | |
101
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
59 find_package(google_cloud_cpp_storage REQUIRED) |
1 | 60 find_package(cryptopp CONFIG REQUIRED) |
61 | |
101
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
62 set(CMAKE_CXX_STANDARD 14) |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
63 |
1 | 64 set(COMMON_SOURCES |
78 | 65 ${CMAKE_SOURCE_DIR}/../Common/IStorage.h |
66 ${CMAKE_SOURCE_DIR}/../Common/BaseStorage.h | |
67 ${CMAKE_SOURCE_DIR}/../Common/BaseStorage.cpp | |
1 | 68 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp |
69 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h | |
70 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp | |
71 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h | |
78 | 72 ${CMAKE_SOURCE_DIR}/../Common/FileSystemStorage.h |
73 ${CMAKE_SOURCE_DIR}/../Common/FileSystemStorage.cpp | |
83
431ab61b5760
/move-storage when HybridMode is enabled
Alain Mazy <am@osimis.io>
parents:
78
diff
changeset
|
74 ${CMAKE_SOURCE_DIR}/../Common/MoveStorageJob.h |
431ab61b5760
/move-storage when HybridMode is enabled
Alain Mazy <am@osimis.io>
parents:
78
diff
changeset
|
75 ${CMAKE_SOURCE_DIR}/../Common/MoveStorageJob.cpp |
15 | 76 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
1 | 77 |
78 ${ORTHANC_CORE_SOURCES} | |
79 ) | |
80 | |
81 add_library(OrthancGoogleCloudStorage SHARED | |
82 GoogleStoragePlugin.cpp | |
83 GoogleStoragePlugin.h | |
84 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp | |
85 | |
86 ${COMMON_SOURCES} | |
87 ) | |
88 | |
105 | 89 DefineSourceBasenameForTarget(OrthancGoogleCloudStorage) |
90 | |
1 | 91 set_target_properties(OrthancGoogleCloudStorage PROPERTIES |
92 VERSION ${PLUGIN_VERSION} | |
93 SOVERSION ${PLUGIN_VERSION} | |
94 ) | |
95 | |
96 target_link_libraries(OrthancGoogleCloudStorage | |
97 PRIVATE | |
101
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
98 CURL::libcurl |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
99 google-cloud-cpp::storage |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
100 google-cloud-cpp::experimental-storage-grpc |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
101 cryptopp::cryptopp |
1 | 102 ) |
103 | |
104 add_executable(UnitTests | |
105 ${GOOGLE_TEST_SOURCES} | |
106 ${COMMON_SOURCES} | |
107 | |
108 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp | |
109 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp | |
110 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsGcsClient.cpp | |
111 ) | |
112 | |
113 target_link_libraries(UnitTests | |
114 PRIVATE | |
101
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
115 CURL::libcurl |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
116 google-cloud-cpp::storage |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
117 google-cloud-cpp::experimental-storage-grpc |
57be7094d6c5
updated Google plugin for latest SDK
Alain Mazy <am@osimis.io>
parents:
83
diff
changeset
|
118 cryptopp::cryptopp |
1 | 119 ${GOOGLE_TEST_LIBRARIES} |
120 ) |