Mercurial > hg > orthanc-object-storage
annotate Azure/CMakeLists.txt @ 30:662b9d3f217d
fix missing definition of "byte" from CryptoPP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 03 Oct 2020 10:39:45 +0200 |
parents | 319d41a22de4 |
children | 7ddd840563c9 |
rev | line source |
---|---|
1 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
3 project(OrthancAzureBlobStorage) | |
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) | |
22
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
20 set(ENABLE_MODULE_IMAGES OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
21 set(ENABLE_MODULE_JOBS OFF) |
319d41a22de4
more lightweight use of Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
18
diff
changeset
|
22 set(ENABLE_MODULE_DICOM OFF) |
1 | 23 |
15 | 24 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
|
25 include(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
1 | 26 |
27 add_definitions( | |
28 -DHAS_ORTHANC_EXCEPTION=1 | |
15 | 29 -DORTHANC_ENABLE_LOGGING=1 |
1 | 30 -DAZURE_STORAGE_PLUGIN=1 |
31 ) | |
32 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}") | |
33 | |
34 include_directories( | |
15 | 35 ${ORTHANC_FRAMEWORK_ROOT} |
36 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include | |
37 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common | |
1 | 38 ) |
39 | |
40 | |
41 find_package(cryptopp CONFIG REQUIRED) | |
42 | |
43 # Azure stuff (from https://github.com/Microsoft/vcpkg/issues/6277) | |
44 find_package(cpprestsdk CONFIG REQUIRED) | |
45 find_path(WASTORAGE_INCLUDE_DIR was/blob.h) | |
46 find_library(WASTORAGE_LIBRARY azurestorage) | |
47 find_package(Boost REQUIRED COMPONENTS log) | |
48 find_library(UUID_LIBRARY uuid) | |
49 find_package(LibXml2 REQUIRED) | |
50 | |
51 include_directories(${WASTORAGE_INCLUDE_DIR}) | |
52 | |
53 set(COMMON_SOURCES | |
54 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h | |
15 | 55 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h |
56 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp | |
1 | 57 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp |
58 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h | |
59 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp | |
60 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h | |
15 | 61 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
1 | 62 |
63 ${ORTHANC_CORE_SOURCES} | |
64 ) | |
65 | |
66 add_library(OrthancAzureBlobStorage SHARED | |
67 AzureBlobStoragePlugin.cpp | |
68 AzureBlobStoragePlugin.h | |
69 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp | |
70 | |
71 ${COMMON_SOURCES} | |
72 ) | |
73 | |
74 set_target_properties(OrthancAzureBlobStorage PROPERTIES | |
75 VERSION ${PLUGIN_VERSION} | |
76 SOVERSION ${PLUGIN_VERSION} | |
77 ) | |
78 | |
79 target_link_libraries(OrthancAzureBlobStorage | |
80 PRIVATE | |
81 cryptopp-static | |
82 ${WASTORAGE_LIBRARY} ${UUID_LIBRARY} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} cpprestsdk::cpprest | |
83 ) | |
84 | |
85 | |
86 | |
87 add_executable(UnitTests | |
88 ${GOOGLE_TEST_SOURCES} | |
89 ${COMMON_SOURCES} | |
90 | |
91 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp | |
92 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp | |
93 ) | |
94 | |
95 target_link_libraries(UnitTests | |
96 PRIVATE | |
97 cryptopp-static | |
98 ${GOOGLE_TEST_LIBRARIES} | |
99 ${WASTORAGE_LIBRARY} ${UUID_LIBRARY} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} cpprestsdk::cpprest | |
100 ) |