Mercurial > hg > orthanc-object-storage
annotate Aws/CMakeLists.txt @ 24:84c4ca822a13
fix warning in unit test
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Sep 2020 14:18:57 +0200 |
parents | 319d41a22de4 |
children | 471eaf5c5d39 |
rev | line source |
---|---|
1 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
3 option(BUILD_SHARED_LIBS "Build shared libraries" ON) | |
4 | |
5 project(OrthancAwsS3Storage) | |
6 | |
2 | 7 set(PLUGIN_VERSION "mainline") |
1 | 8 |
9 include(CheckIncludeFileCXX) | |
10 | |
11 set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source") | |
15 | 12 set(ORTHANC_FRAMEWORK_VERSION "1.7.3" CACHE STRING "orthanc framework version") |
1 | 13 set(ALLOW_DOWNLOADS ON) |
14 | |
15 # Download and setup the Orthanc framework | |
16 include(${CMAKE_SOURCE_DIR}/../Common/Resources/DownloadOrthancFramework.cmake) | |
17 | |
15 | 18 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) |
1 | 19 |
20 set(ENABLE_GOOGLE_TEST ON) | |
21 set(ORTHANC_FRAMEWORK_PLUGIN ON) | |
22
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
22 set(ENABLE_MODULE_IMAGES OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
23 set(ENABLE_MODULE_JOBS OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
24 set(ENABLE_MODULE_DICOM OFF) |
1 | 25 |
15 | 26 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
|
27 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
1 | 28 |
29 | |
30 add_definitions( | |
31 -DHAS_ORTHANC_EXCEPTION=1 | |
15 | 32 -DORTHANC_ENABLE_LOGGING=1 |
1 | 33 -DAWS_STORAGE_PLUGIN=1 |
34 ) | |
35 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}") | |
36 | |
37 include_directories( | |
15 | 38 ${ORTHANC_FRAMEWORK_ROOT} |
39 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include | |
40 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common | |
1 | 41 ) |
42 | |
43 | |
44 find_package(cryptopp CONFIG REQUIRED) | |
45 find_package(AWSSDK REQUIRED COMPONENTS s3) | |
46 | |
47 include_directories(${WASTORAGE_INCLUDE_DIR}) | |
48 | |
49 set(COMMON_SOURCES | |
50 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h | |
15 | 51 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h |
52 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp | |
1 | 53 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp |
54 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h | |
55 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp | |
56 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h | |
15 | 57 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
1 | 58 |
59 ${ORTHANC_CORE_SOURCES} | |
60 ) | |
61 | |
62 add_library(OrthancAwsS3Storage SHARED | |
63 AwsS3StoragePlugin.cpp | |
64 AwsS3StoragePlugin.h | |
65 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp | |
66 | |
67 ${COMMON_SOURCES} | |
68 ) | |
69 | |
70 set_target_properties(OrthancAwsS3Storage PROPERTIES | |
71 VERSION ${PLUGIN_VERSION} | |
72 SOVERSION ${PLUGIN_VERSION} | |
73 ) | |
74 | |
75 target_link_libraries(OrthancAwsS3Storage | |
76 PRIVATE | |
77 cryptopp-static | |
78 ${AWSSDK_LINK_LIBRARIES} | |
79 ) | |
80 | |
81 | |
82 | |
83 add_executable(UnitTests | |
84 ${GOOGLE_TEST_SOURCES} | |
85 ${COMMON_SOURCES} | |
86 | |
87 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp | |
88 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp | |
89 ) | |
90 | |
91 target_link_libraries(UnitTests | |
92 PRIVATE | |
93 cryptopp-static | |
94 ${GOOGLE_TEST_LIBRARIES} | |
95 ${AWSSDK_LINK_LIBRARIES} | |
96 ) |