annotate Google/CMakeLists.txt @ 46:3b8fab63313d patch-azure

Add "CreateContainerIfNotExists" config for Azure
author Mark Poscablo <Mark.Poscablo@varian.com>
date Wed, 31 Mar 2021 12:10:00 -0400
parents e568ca940ddd
children 1691da4ae9c3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 project(OrthancGoogleCloudStorage)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4
21
Alain Mazy
parents: 18
diff changeset
5 set(PLUGIN_VERSION "1.1.0")
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7 include(CheckIncludeFileCXX)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9 set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source")
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
10 set(ORTHANC_FRAMEWORK_VERSION "1.7.3" CACHE STRING "orthanc framework version")
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11 set(ALLOW_DOWNLOADS ON)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
12
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
13 # Download and setup the Orthanc framework
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
14 include(${CMAKE_SOURCE_DIR}/../Common/Resources/DownloadOrthancFramework.cmake)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
15
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
16 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake)
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
17
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
18 set(ENABLE_GOOGLE_TEST ON)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
19 set(ORTHANC_FRAMEWORK_PLUGIN ON)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
20
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
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
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
23
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
24
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
25 add_definitions(
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26 -DHAS_ORTHANC_EXCEPTION=1
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
27 -DORTHANC_ENABLE_LOGGING=1
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28 -DGOOGLE_STORAGE_PLUGIN=1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
30 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}")
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32 include_directories(
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
33 ${ORTHANC_FRAMEWORK_ROOT}
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
34 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
35 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
36 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38 find_package(CURL REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 find_package(storage_client REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40 find_package(cryptopp CONFIG REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42 set(COMMON_SOURCES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
43 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
44 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
45 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
47 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
48 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
49 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
50 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
51
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
52 ${ORTHANC_CORE_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
53 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
54
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
55 add_library(OrthancGoogleCloudStorage SHARED
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
56 GoogleStoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
57 GoogleStoragePlugin.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
58 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
59
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
60 ${COMMON_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
61 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
62
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
63 set_target_properties(OrthancGoogleCloudStorage PROPERTIES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
64 VERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
65 SOVERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
66 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
67
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
68 target_link_libraries(OrthancGoogleCloudStorage
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
69 PRIVATE
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
70 storage_client
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
71 cryptopp-static
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
72 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
73
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
74 add_executable(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
75 ${GOOGLE_TEST_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76 ${COMMON_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
77
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
78 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
79 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
80 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsGcsClient.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
81 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
82
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
83 target_link_libraries(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
84 PRIVATE
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
85 cryptopp-static
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
86 storage_client
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
87 ${GOOGLE_TEST_LIBRARIES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
88 )