annotate Aws/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
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 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
5 project(OrthancAwsS3Storage)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6
2
cd1622edea7f version = mainline
Alain Mazy <alain@mazy.be>
parents: 1
diff changeset
7 set(PLUGIN_VERSION "mainline")
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9 include(CheckIncludeFileCXX)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11 set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source")
49
6db76975d0f8 update to Orthanc Framework 1.9.2
Alain Mazy <am@osimis.io>
parents: 47
diff changeset
12 set(ORTHANC_FRAMEWORK_VERSION "1.9.2" CACHE STRING "orthanc framework version")
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
13 set(USE_VCPKG_PACKAGES ON CACHE BOOL "Use Microsoft vcpkg to link against crypto++ and AWS SDK")
28
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
14 set(STATIC_AWS_CLIENT ON CACHE BOOL "Statically link against AWS client library (only if USE_VCPKG_PACKAGES=OFF)")
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
15 set(USE_SYSTEM_CRYPTOPP ON CACHE BOOL "Use the system version of crypto++")
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
16
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
17 # Download and setup the Orthanc framework
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
18 set(ALLOW_DOWNLOADS ON)
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
19 include(${CMAKE_SOURCE_DIR}/../Common/Resources/DownloadOrthancFramework.cmake)
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/OrthancFrameworkParameters.cmake)
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
22
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
23 set(ENABLE_WEB_CLIENT ON) # Access options related to curl
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
24 set(ENABLE_GOOGLE_TEST ON)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
25 set(ORTHANC_FRAMEWORK_PLUGIN ON)
22
319d41a22de4 more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 18
diff changeset
26 set(ENABLE_MODULE_IMAGES OFF)
319d41a22de4 more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 18
diff changeset
27 set(ENABLE_MODULE_JOBS OFF)
319d41a22de4 more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 18
diff changeset
28 set(ENABLE_MODULE_DICOM OFF)
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
30 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
31 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake)
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
33
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
34 add_definitions(
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
35 -DHAS_ORTHANC_EXCEPTION=1
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
36 -DORTHANC_ENABLE_LOGGING=1
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37 -DAWS_STORAGE_PLUGIN=1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}")
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41 include_directories(
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
42 ${ORTHANC_FRAMEWORK_ROOT}
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
43 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
44 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
45 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
47
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
48 if (NOT STATIC_BUILD AND USE_VCPKG_PACKAGES)
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
49 # Use vcpkg by Microsoft
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
50 find_package(cryptopp CONFIG REQUIRED)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
51 find_package(AWSSDK REQUIRED COMPONENTS s3)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
52 set(CRYPTOPP_LIBRARIES cryptopp-static)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
53 else()
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
54 include(${CMAKE_SOURCE_DIR}/../Common/CryptoPPConfiguration.cmake)
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
55
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
56 ##
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
57 ## Building the C++ SDK for Amazon AWS
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
58 ## WARNING: This is *not* compatible with Ninja (yet)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
59 ##
28
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
60 if (STATIC_AWS_CLIENT)
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
61 set(Flags -DBUILD_SHARED_LIBS=OFF) # Create static library
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
62 else()
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
63 set(Flags -DBUILD_SHARED_LIBS=ON)
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
64 endif()
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
65
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
66 include(ExternalProject)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
67 externalproject_add(AwsSdkCpp
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
68 GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
69 GIT_TAG 1.8.127
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
70
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
71 CMAKE_ARGS
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
72 -DBUILD_ONLY=s3 #-DBUILD_ONLY=s3;transfer
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
73 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
74 -DENABLE_TESTING=OFF
28
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
75 ${Flags}
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
77 UPDATE_COMMAND "" # Don't run "cmake" on AWS each time "make/ninja" is run
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
78 INSTALL_COMMAND "" # No install
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
79 )
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
80
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
81 ExternalProject_Get_Property(AwsSdkCpp SOURCE_DIR)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
82 include_directories(
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
83 ${SOURCE_DIR}/aws-cpp-sdk-core/include/
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
84 ${SOURCE_DIR}/aws-cpp-sdk-s3/include/
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
85 )
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
86
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
87 ExternalProject_Get_Property(AwsSdkCpp BINARY_DIR)
28
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
88 if (STATIC_AWS_CLIENT)
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
89 set(AWSSDK_LINK_LIBRARIES
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
90 ${BINARY_DIR}/aws-cpp-sdk-s3/libaws-cpp-sdk-s3.a
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
91 ${BINARY_DIR}/aws-cpp-sdk-core/libaws-cpp-sdk-core.a
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
92 ${BINARY_DIR}/.deps/install/lib/libaws-c-event-stream.a
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
93 ${BINARY_DIR}/.deps/install/lib/libaws-checksums.a
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
94 ${BINARY_DIR}/.deps/install/lib/libaws-c-common.a
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
95 curl
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
96 crypto
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
97 )
29
46621cb1bb48 fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
98 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
46621cb1bb48 fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
99 list(APPEND AWSSDK_LINK_LIBRARIES
46621cb1bb48 fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
100 gcc # for "undefined reference to `__cpu_model'" on Ubuntu 16.04
46621cb1bb48 fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
101 )
46621cb1bb48 fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
102 endif()
28
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
103 else()
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
104 set(AWSSDK_LINK_LIBRARIES
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
105 ${BINARY_DIR}/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
106 ${BINARY_DIR}/aws-cpp-sdk-s3/libaws-cpp-sdk-s3.so
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
107 )
318c1442d9bd STATIC_AWS_CLIENT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
108 endif()
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
109 endif()
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
110
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
111
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
112 set(COMMON_SOURCES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
113 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
114 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
115 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
116 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
117 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
118 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
119 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
120 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
121
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
122 ${ORTHANC_CORE_SOURCES}
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
123 ${CRYPTOPP_SOURCES}
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
124 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
125
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
126 add_library(OrthancAwsS3Storage SHARED
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
127 AwsS3StoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
128 AwsS3StoragePlugin.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
129 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
130
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
131 ${COMMON_SOURCES}
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
132 )
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
133
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
134 set_target_properties(OrthancAwsS3Storage PROPERTIES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
135 VERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
136 SOVERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
137 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
138
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
139 target_link_libraries(OrthancAwsS3Storage
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
140 PRIVATE
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
141 ${CRYPTOPP_LIBRARIES}
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
142 ${AWSSDK_LINK_LIBRARIES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
143 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
144
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
145
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
146
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
147 add_executable(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
148 ${GOOGLE_TEST_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
149 ${COMMON_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
150
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
151 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
152 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
153 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
154
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
155 target_link_libraries(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
156 PRIVATE
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
157 ${GOOGLE_TEST_LIBRARIES}
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
158 ${CRYPTOPP_LIBRARIES}
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
159 ${AWSSDK_LINK_LIBRARIES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
160 )
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
161
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
162
38
9c0dfd10d5d0 statically link against libcrypto++
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
163 if (STATIC_BUILD OR NOT USE_VCPKG_PACKAGES)
26
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
164 add_dependencies(OrthancAwsS3Storage AwsSdkCpp)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
165 add_dependencies(UnitTests AwsSdkCpp)
471eaf5c5d39 USE_VCPKG_PACKAGES to avoid using vcpkg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
166 endif()