annotate Google/CMakeLists.txt @ 22:319d41a22de4

more lightweight use of Orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Sep 2020 14:17:43 +0200
parents 44de9edf2443
children f10874e13d11
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
2
cd1622edea7f version = mainline
Alain Mazy <alain@mazy.be>
parents: 1
diff changeset
5 set(PLUGIN_VERSION "mainline")
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)
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
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
23
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
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
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
27
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28 add_definitions(
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29 -DHAS_ORTHANC_EXCEPTION=1
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
30 -DORTHANC_ENABLE_LOGGING=1
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31 -DGOOGLE_STORAGE_PLUGIN=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 add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}")
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
34
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
35 include_directories(
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
36 ${ORTHANC_FRAMEWORK_ROOT}
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
37 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
38 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41 find_package(CURL REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42 find_package(storage_client REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
43 find_package(cryptopp CONFIG REQUIRED)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
44
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
45 set(COMMON_SOURCES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46 ${CMAKE_SOURCE_DIR}/../Common/IStoragePlugin.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
47 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.h
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
48 ${CMAKE_SOURCE_DIR}/../Common/BaseStoragePlugin.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
49 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
50 ${CMAKE_SOURCE_DIR}/../Common/EncryptionHelpers.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
51 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
52 ${CMAKE_SOURCE_DIR}/../Common/EncryptionConfigurator.h
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 8
diff changeset
53 ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
54
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
55 ${ORTHANC_CORE_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
56 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
57
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
58 add_library(OrthancGoogleCloudStorage SHARED
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
59 GoogleStoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
60 GoogleStoragePlugin.h
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
61 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
62
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
63 ${COMMON_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
64 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
65
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
66 set_target_properties(OrthancGoogleCloudStorage PROPERTIES
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
67 VERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
68 SOVERSION ${PLUGIN_VERSION}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
69 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
70
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
71 target_link_libraries(OrthancGoogleCloudStorage
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
72 PRIVATE
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
73 storage_client
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
74 cryptopp-static
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
75 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
77 add_executable(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
78 ${GOOGLE_TEST_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
79 ${COMMON_SOURCES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
80
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
81 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/EncryptionTests.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
82 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsMain.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
83 ${CMAKE_SOURCE_DIR}/../UnitTestsSources/UnitTestsGcsClient.cpp
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
84 )
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
85
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
86 target_link_libraries(UnitTests
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
87 PRIVATE
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
88 cryptopp-static
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
89 storage_client
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
90 ${GOOGLE_TEST_LIBRARIES}
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
91 )