Mercurial > hg > orthanc-object-storage
comparison Aws/AwsStaticConfiguration.cmake @ 56:b922ae86bbe1
full static linking against AWS SDK
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Jun 2021 15:00:36 +0200 |
parents | |
children | ba1be668e475 |
comparison
equal
deleted
inserted
replaced
55:9d03e24dafc1 | 56:b922ae86bbe1 |
---|---|
1 # Cloud storage plugins for Orthanc | |
2 # Copyright (C) 2020-2021 Osimis S.A., Belgium | |
3 # | |
4 # This program is free software: you can redistribute it and/or | |
5 # modify it under the terms of the GNU Affero General Public License | |
6 # as published by the Free Software Foundation, either version 3 of | |
7 # the License, or (at your option) any later version. | |
8 # | |
9 # This program is distributed in the hope that it will be useful, but | |
10 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 # Affero General Public License for more details. | |
13 # | |
14 # You should have received a copy of the GNU Affero General Public License | |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | |
17 | |
18 SET(AWS_C_COMMON_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-common-0.6.2) | |
19 SET(AWS_C_COMMON_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-common-0.6.2.tar.gz") | |
20 SET(AWS_C_COMMON_MD5 "aa6dc4bde2d035ad84ec40e3ea1e2bff") | |
21 DownloadPackage(${AWS_C_COMMON_MD5} ${AWS_C_COMMON_URL} "${AWS_C_COMMON_SOURCES_DIR}") | |
22 | |
23 SET(AWS_CHECKSUMS_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-checksums-0.1.11) | |
24 SET(AWS_CHECKSUMS_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-checksums-0.1.11.tar.gz") | |
25 SET(AWS_CHECKSUMS_MD5 "4ec8e8065d0d3cd53c86e16692e79dcb") | |
26 DownloadPackage(${AWS_CHECKSUMS_MD5} ${AWS_CHECKSUMS_URL} "${AWS_CHECKSUMS_SOURCES_DIR}") | |
27 | |
28 SET(AWS_C_AUTH_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-auth-0.6.0) | |
29 SET(AWS_C_AUTH_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-auth-0.6.0.tar.gz") | |
30 SET(AWS_C_AUTH_MD5 "e82d991dbd1c1acee210d4ac1fd518dc") | |
31 DownloadPackage(${AWS_C_AUTH_MD5} ${AWS_C_AUTH_URL} "${AWS_C_AUTH_SOURCES_DIR}") | |
32 | |
33 SET(AWS_C_CAL_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-cal-0.5.11) | |
34 SET(AWS_C_CAL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-cal-0.5.11.tar.gz") | |
35 SET(AWS_C_CAL_MD5 "2099fc945a02feda56b8ecd1ea77acf9") | |
36 DownloadPackage(${AWS_C_CAL_MD5} ${AWS_C_CAL_URL} "${AWS_C_CAL_SOURCES_DIR}") | |
37 | |
38 SET(AWS_C_COMPRESSION_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-compression-0.2.13) | |
39 SET(AWS_C_COMPRESSION_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-compression-0.2.13.tar.gz") | |
40 SET(AWS_C_COMPRESSION_MD5 "e96ed91a832116a05a60e49e9946623e") | |
41 DownloadPackage(${AWS_C_COMPRESSION_MD5} ${AWS_C_COMPRESSION_URL} "${AWS_C_COMPRESSION_SOURCES_DIR}") | |
42 | |
43 SET(AWS_C_EVENT_STREAM_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-event-stream-0.2.7) | |
44 SET(AWS_C_EVENT_STREAM_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-event-stream-0.2.7.tar.gz") | |
45 SET(AWS_C_EVENT_STREAM_MD5 "5cf71f97962e22c4bc7fd75b9a8daf49") | |
46 DownloadPackage(${AWS_C_EVENT_STREAM_MD5} ${AWS_C_EVENT_STREAM_URL} "${AWS_C_EVENT_STREAM_SOURCES_DIR}") | |
47 | |
48 SET(AWS_C_HTTP_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-http-0.6.4) | |
49 SET(AWS_C_HTTP_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-http-0.6.4.tar.gz") | |
50 SET(AWS_C_HTTP_MD5 "7ac847811ff27f1671b31514e3493913") | |
51 DownloadPackage(${AWS_C_HTTP_MD5} ${AWS_C_HTTP_URL} "${AWS_C_HTTP_SOURCES_DIR}") | |
52 | |
53 SET(AWS_C_IO_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-io-0.10.5) | |
54 SET(AWS_C_IO_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-io-0.10.5.tar.gz") | |
55 SET(AWS_C_IO_MD5 "2a450a918184aaf7e80afc80b515397b") | |
56 DownloadPackage(${AWS_C_IO_MD5} ${AWS_C_IO_URL} "${AWS_C_IO_SOURCES_DIR}") | |
57 | |
58 SET(AWS_C_MQTT_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-mqtt-0.7.6) | |
59 SET(AWS_C_MQTT_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-mqtt-0.7.6.tar.gz") | |
60 SET(AWS_C_MQTT_MD5 "29aca202d29b9934f630a204f6731031") | |
61 DownloadPackage(${AWS_C_MQTT_MD5} ${AWS_C_MQTT_URL} "${AWS_C_MQTT_SOURCES_DIR}") | |
62 | |
63 SET(AWS_C_S3_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-s3-0.1.19) | |
64 SET(AWS_C_S3_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-c-s3-0.1.19.tar.gz") | |
65 SET(AWS_C_S3_MD5 "ae5e98f70075fd40093af856b72a04fb") | |
66 DownloadPackage(${AWS_C_S3_MD5} ${AWS_C_S3_URL} "${AWS_C_S3_SOURCES_DIR}") | |
67 | |
68 SET(AWS_CRT_CPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-crt-cpp-0.14.0) | |
69 SET(AWS_CRT_CPP_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-crt-cpp-0.14.0.tar.gz") | |
70 SET(AWS_CRT_CPP_MD5 "4298ab05b95380f960c7b0184df5c078") | |
71 DownloadPackage(${AWS_CRT_CPP_MD5} ${AWS_CRT_CPP_URL} "${AWS_CRT_CPP_SOURCES_DIR}") | |
72 | |
73 SET(AWS_SDK_CPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-sdk-cpp-1.9.45) | |
74 SET(AWS_SDK_CPP_URL "http://orthanc.osimis.io/ThirdPartyDownloads/aws/aws-sdk-cpp-1.9.45.tar.gz") | |
75 SET(AWS_SDK_CPP_MD5 "f2f2d48b119fda2ef17d2604c0cca52e") | |
76 DownloadPackage(${AWS_SDK_CPP_MD5} ${AWS_SDK_CPP_URL} "${AWS_SDK_CPP_SOURCES_DIR}") | |
77 | |
78 | |
79 configure_file( | |
80 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/include/aws/core/SDKConfig.h.in | |
81 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/include/aws/core/SDKConfig.h | |
82 ) | |
83 | |
84 configure_file( | |
85 ${AWS_C_COMMON_SOURCES_DIR}/include/aws/common/config.h.in | |
86 ${AWS_C_COMMON_SOURCES_DIR}/include/aws/common/config.h | |
87 ) | |
88 | |
89 | |
90 include_directories( | |
91 ${AWS_C_COMMON_SOURCES_DIR}/include/ | |
92 ${AWS_C_AUTH_SOURCES_DIR}/include/ | |
93 ${AWS_C_CAL_SOURCES_DIR}/include/ | |
94 ${AWS_C_COMPRESSION_SOURCES_DIR}/include/ | |
95 ${AWS_C_IO_SOURCES_DIR}/include/ | |
96 ${AWS_C_HTTP_SOURCES_DIR}/include/ | |
97 ${AWS_C_MQTT_SOURCES_DIR}/include/ | |
98 ${AWS_C_S3_SOURCES_DIR}/include/ | |
99 ${AWS_C_EVENT_STREAM_SOURCES_DIR}/include/ | |
100 ${AWS_CHECKSUMS_SOURCES_DIR}/include/ | |
101 ${AWS_CRT_CPP_SOURCES_DIR}/include/ | |
102 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/include/ | |
103 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-s3/include/ | |
104 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-connect/include/ | |
105 ) | |
106 | |
107 | |
108 list(APPEND AWS_SOURCES_SUBDIRS | |
109 ${AWS_C_COMMON_SOURCES_DIR}/source/ | |
110 | |
111 ## C libraries | |
112 | |
113 ${AWS_CHECKSUMS_SOURCES_DIR}/source/ | |
114 ${AWS_C_AUTH_SOURCES_DIR}/source/ | |
115 ${AWS_C_CAL_SOURCES_DIR}/source/ | |
116 ${AWS_C_COMPRESSION_SOURCES_DIR}/source/ | |
117 ${AWS_C_EVENT_STREAM_SOURCES_DIR}/source/ | |
118 ${AWS_C_HTTP_SOURCES_DIR}/source/ | |
119 ${AWS_C_IO_SOURCES_DIR}/source/ | |
120 ${AWS_C_MQTT_SOURCES_DIR}/source/ | |
121 ${AWS_C_S3_SOURCES_DIR}/source/ | |
122 | |
123 ## C++ libraries | |
124 | |
125 ${AWS_CRT_CPP_SOURCES_DIR}/source/ | |
126 ${AWS_CRT_CPP_SOURCES_DIR}/source/auth/ | |
127 ${AWS_CRT_CPP_SOURCES_DIR}/source/crypto/ | |
128 ${AWS_CRT_CPP_SOURCES_DIR}/source/http/ | |
129 ${AWS_CRT_CPP_SOURCES_DIR}/source/io/ | |
130 ${AWS_CRT_CPP_SOURCES_DIR}/source/external/ | |
131 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-connect/source/ | |
132 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-connect/source/model/ | |
133 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/ | |
134 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/auth/ | |
135 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/client/ | |
136 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/config/ | |
137 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/external/cjson/ | |
138 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/external/tinyxml2/ | |
139 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/http/ | |
140 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/http/standard/ | |
141 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/internal/ | |
142 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/monitoring/ | |
143 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/net/ | |
144 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/ | |
145 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/base64/ | |
146 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/crypto/ | |
147 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/crypto/factory/ | |
148 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/event/ | |
149 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/json/ | |
150 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/logging/ | |
151 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/memory/ | |
152 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/stream/ | |
153 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/threading/ | |
154 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/utils/xml/ | |
155 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-s3/source/ | |
156 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-s3/source/model/ | |
157 ) | |
158 | |
159 | |
160 add_definitions( | |
161 -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD_ATTR | |
162 -DBYO_CRYPTO # To have "aws_tls_server_ctx_new()" defined | |
163 ) | |
164 | |
165 list(APPEND AWS_SOURCES_SUBDIRS | |
166 #${AWS_C_CAL_SOURCES_DIR}/source/unix/ | |
167 #${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/net/linux-shared/ | |
168 ${AWS_C_COMMON_SOURCES_DIR}/source/posix/ | |
169 ${AWS_C_IO_SOURCES_DIR}/source/linux/ | |
170 ${AWS_C_IO_SOURCES_DIR}/source/posix/ | |
171 ${AWS_SDK_CPP_SOURCES_DIR}/aws-cpp-sdk-core/source/platform/linux-shared/ | |
172 ) | |
173 | |
174 | |
175 foreach(d ${AWS_SOURCES_SUBDIRS}) | |
176 aux_source_directory(${d} AWS_SOURCES) | |
177 endforeach() | |
178 | |
179 | |
180 list(APPEND AWS_SOURCES | |
181 ${AWS_C_COMMON_SOURCES_DIR}/source/arch/generic/cpuid.c | |
182 ${AWS_CHECKSUMS_SOURCES_DIR}/source/generic/crc32c_null.c | |
183 ) |