Mercurial > hg > orthanc
comparison Resources/CMake/OpenSslConfiguration.cmake @ 2379:4900688827a8
reorganization in CMake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 28 Aug 2017 18:07:03 +0200 |
parents | 2aff870c2c58 |
children | 741bb76634d3 |
comparison
equal
deleted
inserted
replaced
2378:116ade1eff82 | 2379:4900688827a8 |
---|---|
1 if (ENABLE_SSL) | 1 if (STATIC_BUILD OR NOT USE_SYSTEM_OPENSSL) |
2 if (STATIC_BUILD OR NOT USE_SYSTEM_OPENSSL) | 2 # WARNING - We had to repack the upstream ".tar.gz" file to a ZIP |
3 # WARNING - We had to repack the upstream ".tar.gz" file to a ZIP | 3 # file, as the upstream distribution ships symbolic links that are |
4 # file, as the upstream distribution ships symbolic links that are | 4 # not always properly handled when uncompressing on Windows. |
5 # not always properly handled when uncompressing on Windows. | 5 |
6 | 6 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.0.2d) |
7 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.0.2d) | 7 SET(OPENSSL_URL "http://www.orthanc-server.com/downloads/third-party/openssl-1.0.2d.zip") |
8 SET(OPENSSL_URL "http://www.orthanc-server.com/downloads/third-party/openssl-1.0.2d.zip") | 8 SET(OPENSSL_MD5 "4b2ac15fc6db17f3dadc54482d3eee85") |
9 SET(OPENSSL_MD5 "4b2ac15fc6db17f3dadc54482d3eee85") | 9 |
10 | 10 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}") |
11 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}") | 11 set(FirstRun OFF) |
12 set(FirstRun OFF) | 12 else() |
13 else() | 13 set(FirstRun ON) |
14 set(FirstRun ON) | 14 endif() |
15 | |
16 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}") | |
17 | |
18 add_definitions( | |
19 -DOPENSSL_THREADS | |
20 -DOPENSSL_IA32_SSE2 | |
21 -DOPENSSL_NO_ASM | |
22 -DOPENSSL_NO_DYNAMIC_ENGINE | |
23 -DNO_WINDOWS_BRAINDEATH | |
24 | |
25 -DOPENSSL_NO_BF | |
26 -DOPENSSL_NO_CAMELLIA | |
27 -DOPENSSL_NO_CAST | |
28 -DOPENSSL_NO_EC_NISTP_64_GCC_128 | |
29 -DOPENSSL_NO_GMP | |
30 -DOPENSSL_NO_GOST | |
31 -DOPENSSL_NO_HW | |
32 -DOPENSSL_NO_JPAKE | |
33 -DOPENSSL_NO_IDEA | |
34 -DOPENSSL_NO_KRB5 | |
35 -DOPENSSL_NO_MD2 | |
36 -DOPENSSL_NO_MDC2 | |
37 -DOPENSSL_NO_MD4 | |
38 -DOPENSSL_NO_RC2 | |
39 -DOPENSSL_NO_RC4 | |
40 -DOPENSSL_NO_RC5 | |
41 -DOPENSSL_NO_RFC3779 | |
42 -DOPENSSL_NO_SCTP | |
43 -DOPENSSL_NO_STORE | |
44 -DOPENSSL_NO_SEED | |
45 -DOPENSSL_NO_WHIRLPOOL | |
46 -DOPENSSL_NO_RIPEMD | |
47 ) | |
48 | |
49 include_directories( | |
50 ${OPENSSL_SOURCES_DIR} | |
51 ${OPENSSL_SOURCES_DIR}/crypto | |
52 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
53 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
54 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
55 ${OPENSSL_SOURCES_DIR}/include | |
56 ) | |
57 | |
58 set(OPENSSL_SOURCES_SUBDIRS | |
59 ${OPENSSL_SOURCES_DIR}/crypto | |
60 ${OPENSSL_SOURCES_DIR}/crypto/aes | |
61 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
62 ${OPENSSL_SOURCES_DIR}/crypto/bio | |
63 ${OPENSSL_SOURCES_DIR}/crypto/bn | |
64 ${OPENSSL_SOURCES_DIR}/crypto/buffer | |
65 ${OPENSSL_SOURCES_DIR}/crypto/cmac | |
66 ${OPENSSL_SOURCES_DIR}/crypto/cms | |
67 ${OPENSSL_SOURCES_DIR}/crypto/comp | |
68 ${OPENSSL_SOURCES_DIR}/crypto/conf | |
69 ${OPENSSL_SOURCES_DIR}/crypto/des | |
70 ${OPENSSL_SOURCES_DIR}/crypto/dh | |
71 ${OPENSSL_SOURCES_DIR}/crypto/dsa | |
72 ${OPENSSL_SOURCES_DIR}/crypto/dso | |
73 ${OPENSSL_SOURCES_DIR}/crypto/engine | |
74 ${OPENSSL_SOURCES_DIR}/crypto/err | |
75 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
76 ${OPENSSL_SOURCES_DIR}/crypto/hmac | |
77 ${OPENSSL_SOURCES_DIR}/crypto/lhash | |
78 ${OPENSSL_SOURCES_DIR}/crypto/md5 | |
79 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
80 ${OPENSSL_SOURCES_DIR}/crypto/objects | |
81 ${OPENSSL_SOURCES_DIR}/crypto/ocsp | |
82 ${OPENSSL_SOURCES_DIR}/crypto/pem | |
83 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12 | |
84 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7 | |
85 ${OPENSSL_SOURCES_DIR}/crypto/pqueue | |
86 ${OPENSSL_SOURCES_DIR}/crypto/rand | |
87 ${OPENSSL_SOURCES_DIR}/crypto/rsa | |
88 ${OPENSSL_SOURCES_DIR}/crypto/sha | |
89 ${OPENSSL_SOURCES_DIR}/crypto/srp | |
90 ${OPENSSL_SOURCES_DIR}/crypto/stack | |
91 ${OPENSSL_SOURCES_DIR}/crypto/ts | |
92 ${OPENSSL_SOURCES_DIR}/crypto/txt_db | |
93 ${OPENSSL_SOURCES_DIR}/crypto/ui | |
94 ${OPENSSL_SOURCES_DIR}/crypto/x509 | |
95 ${OPENSSL_SOURCES_DIR}/crypto/x509v3 | |
96 ${OPENSSL_SOURCES_DIR}/ssl | |
97 ) | |
98 | |
99 if (ENABLE_PKCS11) | |
100 list(APPEND OPENSSL_SOURCES_SUBDIRS | |
101 # EC, ECDH and ECDSA are necessary for PKCS11 | |
102 ${OPENSSL_SOURCES_DIR}/crypto/ec | |
103 ${OPENSSL_SOURCES_DIR}/crypto/ecdh | |
104 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa | |
105 ) | |
106 else() | |
107 add_definitions( | |
108 -DOPENSSL_NO_EC | |
109 -DOPENSSL_NO_ECDH | |
110 -DOPENSSL_NO_ECDSA | |
111 ) | |
112 endif() | |
113 | |
114 foreach(d ${OPENSSL_SOURCES_SUBDIRS}) | |
115 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES) | |
116 endforeach() | |
117 | |
118 list(REMOVE_ITEM OPENSSL_SOURCES | |
119 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c | |
120 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c | |
121 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c | |
122 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c | |
123 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c | |
124 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c | |
125 ${OPENSSL_SOURCES_DIR}/crypto/bf/bfs.cpp | |
126 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_rtcp.c | |
127 ${OPENSSL_SOURCES_DIR}/crypto/bn/exp.c | |
128 ${OPENSSL_SOURCES_DIR}/crypto/conf/cnf_save.c | |
129 ${OPENSSL_SOURCES_DIR}/crypto/conf/test.c | |
130 ${OPENSSL_SOURCES_DIR}/crypto/des/des.c | |
131 ${OPENSSL_SOURCES_DIR}/crypto/des/des3s.cpp | |
132 ${OPENSSL_SOURCES_DIR}/crypto/des/des_opts.c | |
133 ${OPENSSL_SOURCES_DIR}/crypto/des/dess.cpp | |
134 ${OPENSSL_SOURCES_DIR}/crypto/des/read_pwd.c | |
135 ${OPENSSL_SOURCES_DIR}/crypto/des/speed.c | |
136 ${OPENSSL_SOURCES_DIR}/crypto/evp/e_dsa.c | |
137 ${OPENSSL_SOURCES_DIR}/crypto/evp/m_ripemd.c | |
138 ${OPENSSL_SOURCES_DIR}/crypto/lhash/lh_test.c | |
139 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5s.cpp | |
140 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/bio_ber.c | |
141 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/pk7_enc.c | |
142 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c | |
143 ${OPENSSL_SOURCES_DIR}/crypto/rand/randtest.c | |
144 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c | |
145 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c | |
146 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/tabtest.c | |
147 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3conf.c | |
148 ${OPENSSL_SOURCES_DIR}/ssl/ssl_task.c | |
149 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c | |
150 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c | |
151 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c | |
152 ${OPENSSL_SOURCES_DIR}/crypto/bn/bntest.c | |
153 ${OPENSSL_SOURCES_DIR}/crypto/bn/expspeed.c | |
154 ${OPENSSL_SOURCES_DIR}/crypto/bn/exptest.c | |
155 ${OPENSSL_SOURCES_DIR}/crypto/engine/enginetest.c | |
156 ${OPENSSL_SOURCES_DIR}/crypto/evp/evp_test.c | |
157 ${OPENSSL_SOURCES_DIR}/crypto/hmac/hmactest.c | |
158 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5.c | |
159 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5test.c | |
160 ${OPENSSL_SOURCES_DIR}/crypto/o_dir_test.c | |
161 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/dec.c | |
162 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/enc.c | |
163 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/sign.c | |
164 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/verify.c | |
165 ${OPENSSL_SOURCES_DIR}/crypto/rsa/rsa_test.c | |
166 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha.c | |
167 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1.c | |
168 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1t.c | |
169 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1test.c | |
170 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha256t.c | |
171 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha512t.c | |
172 ${OPENSSL_SOURCES_DIR}/crypto/sha/shatest.c | |
173 ${OPENSSL_SOURCES_DIR}/crypto/srp/srptest.c | |
174 | |
175 ${OPENSSL_SOURCES_DIR}/crypto/bn/divtest.c | |
176 ${OPENSSL_SOURCES_DIR}/crypto/bn/bnspeed.c | |
177 ${OPENSSL_SOURCES_DIR}/crypto/des/destest.c | |
178 ${OPENSSL_SOURCES_DIR}/crypto/dh/p192.c | |
179 ${OPENSSL_SOURCES_DIR}/crypto/dh/p512.c | |
180 ${OPENSSL_SOURCES_DIR}/crypto/dh/p1024.c | |
181 ${OPENSSL_SOURCES_DIR}/crypto/des/rpw.c | |
182 ${OPENSSL_SOURCES_DIR}/ssl/ssltest.c | |
183 ${OPENSSL_SOURCES_DIR}/crypto/dsa/dsagen.c | |
184 ${OPENSSL_SOURCES_DIR}/crypto/dsa/dsatest.c | |
185 ${OPENSSL_SOURCES_DIR}/crypto/dh/dhtest.c | |
186 ${OPENSSL_SOURCES_DIR}/crypto/pqueue/pq_test.c | |
187 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c | |
188 | |
189 ${OPENSSL_SOURCES_DIR}/crypto/evp/evp_extra_test.c | |
190 ${OPENSSL_SOURCES_DIR}/crypto/evp/verify_extra_test.c | |
191 ${OPENSSL_SOURCES_DIR}/crypto/x509/verify_extra_test.c | |
192 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3prin.c | |
193 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3nametest.c | |
194 ${OPENSSL_SOURCES_DIR}/crypto/constant_time_test.c | |
195 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c | |
196 | |
197 ${OPENSSL_SOURCES_DIR}/ssl/heartbeat_test.c | |
198 ) | |
199 | |
200 | |
201 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
202 set_source_files_properties( | |
203 ${OPENSSL_SOURCES} | |
204 PROPERTIES COMPILE_DEFINITIONS | |
205 "OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN") | |
206 | |
207 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
208 execute_process( | |
209 COMMAND ${PATCH_EXECUTABLE} -N ui_openssl.c -i ${ORTHANC_ROOT}/Resources/Patches/openssl-lsb.diff | |
210 WORKING_DIRECTORY ${OPENSSL_SOURCES_DIR}/crypto/ui | |
211 RESULT_VARIABLE Failure | |
212 ) | |
213 | |
214 if (Failure AND FirstRun) | |
215 message(FATAL_ERROR "Error while patching a file") | |
15 endif() | 216 endif() |
16 | 217 endif() |
17 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}") | 218 |
18 | 219 source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*) |
19 add_definitions( | 220 |
20 -DOPENSSL_THREADS | 221 else() |
21 -DOPENSSL_IA32_SSE2 | 222 include(FindOpenSSL) |
22 -DOPENSSL_NO_ASM | 223 |
23 -DOPENSSL_NO_DYNAMIC_ENGINE | 224 if (NOT ${OPENSSL_FOUND}) |
24 -DNO_WINDOWS_BRAINDEATH | 225 message(FATAL_ERROR "Unable to find OpenSSL") |
25 | 226 endif() |
26 -DOPENSSL_NO_BF | 227 |
27 -DOPENSSL_NO_CAMELLIA | 228 include_directories(${OPENSSL_INCLUDE_DIR}) |
28 -DOPENSSL_NO_CAST | 229 link_libraries(${OPENSSL_LIBRARIES}) |
29 -DOPENSSL_NO_EC_NISTP_64_GCC_128 | |
30 -DOPENSSL_NO_GMP | |
31 -DOPENSSL_NO_GOST | |
32 -DOPENSSL_NO_HW | |
33 -DOPENSSL_NO_JPAKE | |
34 -DOPENSSL_NO_IDEA | |
35 -DOPENSSL_NO_KRB5 | |
36 -DOPENSSL_NO_MD2 | |
37 -DOPENSSL_NO_MDC2 | |
38 -DOPENSSL_NO_MD4 | |
39 -DOPENSSL_NO_RC2 | |
40 -DOPENSSL_NO_RC4 | |
41 -DOPENSSL_NO_RC5 | |
42 -DOPENSSL_NO_RFC3779 | |
43 -DOPENSSL_NO_SCTP | |
44 -DOPENSSL_NO_STORE | |
45 -DOPENSSL_NO_SEED | |
46 -DOPENSSL_NO_WHIRLPOOL | |
47 -DOPENSSL_NO_RIPEMD | |
48 ) | |
49 | |
50 include_directories( | |
51 ${OPENSSL_SOURCES_DIR} | |
52 ${OPENSSL_SOURCES_DIR}/crypto | |
53 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
54 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
55 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
56 ${OPENSSL_SOURCES_DIR}/include | |
57 ) | |
58 | |
59 set(OPENSSL_SOURCES_SUBDIRS | |
60 ${OPENSSL_SOURCES_DIR}/crypto | |
61 ${OPENSSL_SOURCES_DIR}/crypto/aes | |
62 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
63 ${OPENSSL_SOURCES_DIR}/crypto/bio | |
64 ${OPENSSL_SOURCES_DIR}/crypto/bn | |
65 ${OPENSSL_SOURCES_DIR}/crypto/buffer | |
66 ${OPENSSL_SOURCES_DIR}/crypto/cmac | |
67 ${OPENSSL_SOURCES_DIR}/crypto/cms | |
68 ${OPENSSL_SOURCES_DIR}/crypto/comp | |
69 ${OPENSSL_SOURCES_DIR}/crypto/conf | |
70 ${OPENSSL_SOURCES_DIR}/crypto/des | |
71 ${OPENSSL_SOURCES_DIR}/crypto/dh | |
72 ${OPENSSL_SOURCES_DIR}/crypto/dsa | |
73 ${OPENSSL_SOURCES_DIR}/crypto/dso | |
74 ${OPENSSL_SOURCES_DIR}/crypto/engine | |
75 ${OPENSSL_SOURCES_DIR}/crypto/err | |
76 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
77 ${OPENSSL_SOURCES_DIR}/crypto/hmac | |
78 ${OPENSSL_SOURCES_DIR}/crypto/lhash | |
79 ${OPENSSL_SOURCES_DIR}/crypto/md5 | |
80 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
81 ${OPENSSL_SOURCES_DIR}/crypto/objects | |
82 ${OPENSSL_SOURCES_DIR}/crypto/ocsp | |
83 ${OPENSSL_SOURCES_DIR}/crypto/pem | |
84 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12 | |
85 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7 | |
86 ${OPENSSL_SOURCES_DIR}/crypto/pqueue | |
87 ${OPENSSL_SOURCES_DIR}/crypto/rand | |
88 ${OPENSSL_SOURCES_DIR}/crypto/rsa | |
89 ${OPENSSL_SOURCES_DIR}/crypto/sha | |
90 ${OPENSSL_SOURCES_DIR}/crypto/srp | |
91 ${OPENSSL_SOURCES_DIR}/crypto/stack | |
92 ${OPENSSL_SOURCES_DIR}/crypto/ts | |
93 ${OPENSSL_SOURCES_DIR}/crypto/txt_db | |
94 ${OPENSSL_SOURCES_DIR}/crypto/ui | |
95 ${OPENSSL_SOURCES_DIR}/crypto/x509 | |
96 ${OPENSSL_SOURCES_DIR}/crypto/x509v3 | |
97 ${OPENSSL_SOURCES_DIR}/ssl | |
98 ) | |
99 | |
100 if (ENABLE_PKCS11) | |
101 list(APPEND OPENSSL_SOURCES_SUBDIRS | |
102 # EC, ECDH and ECDSA are necessary for PKCS11 | |
103 ${OPENSSL_SOURCES_DIR}/crypto/ec | |
104 ${OPENSSL_SOURCES_DIR}/crypto/ecdh | |
105 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa | |
106 ) | |
107 else() | |
108 add_definitions( | |
109 -DOPENSSL_NO_EC | |
110 -DOPENSSL_NO_ECDH | |
111 -DOPENSSL_NO_ECDSA | |
112 ) | |
113 endif() | |
114 | |
115 foreach(d ${OPENSSL_SOURCES_SUBDIRS}) | |
116 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES) | |
117 endforeach() | |
118 | |
119 list(REMOVE_ITEM OPENSSL_SOURCES | |
120 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c | |
121 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c | |
122 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c | |
123 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c | |
124 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c | |
125 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c | |
126 ${OPENSSL_SOURCES_DIR}/crypto/bf/bfs.cpp | |
127 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_rtcp.c | |
128 ${OPENSSL_SOURCES_DIR}/crypto/bn/exp.c | |
129 ${OPENSSL_SOURCES_DIR}/crypto/conf/cnf_save.c | |
130 ${OPENSSL_SOURCES_DIR}/crypto/conf/test.c | |
131 ${OPENSSL_SOURCES_DIR}/crypto/des/des.c | |
132 ${OPENSSL_SOURCES_DIR}/crypto/des/des3s.cpp | |
133 ${OPENSSL_SOURCES_DIR}/crypto/des/des_opts.c | |
134 ${OPENSSL_SOURCES_DIR}/crypto/des/dess.cpp | |
135 ${OPENSSL_SOURCES_DIR}/crypto/des/read_pwd.c | |
136 ${OPENSSL_SOURCES_DIR}/crypto/des/speed.c | |
137 ${OPENSSL_SOURCES_DIR}/crypto/evp/e_dsa.c | |
138 ${OPENSSL_SOURCES_DIR}/crypto/evp/m_ripemd.c | |
139 ${OPENSSL_SOURCES_DIR}/crypto/lhash/lh_test.c | |
140 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5s.cpp | |
141 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/bio_ber.c | |
142 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/pk7_enc.c | |
143 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c | |
144 ${OPENSSL_SOURCES_DIR}/crypto/rand/randtest.c | |
145 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c | |
146 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c | |
147 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/tabtest.c | |
148 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3conf.c | |
149 ${OPENSSL_SOURCES_DIR}/ssl/ssl_task.c | |
150 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c | |
151 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c | |
152 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c | |
153 ${OPENSSL_SOURCES_DIR}/crypto/bn/bntest.c | |
154 ${OPENSSL_SOURCES_DIR}/crypto/bn/expspeed.c | |
155 ${OPENSSL_SOURCES_DIR}/crypto/bn/exptest.c | |
156 ${OPENSSL_SOURCES_DIR}/crypto/engine/enginetest.c | |
157 ${OPENSSL_SOURCES_DIR}/crypto/evp/evp_test.c | |
158 ${OPENSSL_SOURCES_DIR}/crypto/hmac/hmactest.c | |
159 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5.c | |
160 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5test.c | |
161 ${OPENSSL_SOURCES_DIR}/crypto/o_dir_test.c | |
162 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/dec.c | |
163 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/enc.c | |
164 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/sign.c | |
165 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/verify.c | |
166 ${OPENSSL_SOURCES_DIR}/crypto/rsa/rsa_test.c | |
167 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha.c | |
168 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1.c | |
169 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1t.c | |
170 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha1test.c | |
171 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha256t.c | |
172 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha512t.c | |
173 ${OPENSSL_SOURCES_DIR}/crypto/sha/shatest.c | |
174 ${OPENSSL_SOURCES_DIR}/crypto/srp/srptest.c | |
175 | |
176 ${OPENSSL_SOURCES_DIR}/crypto/bn/divtest.c | |
177 ${OPENSSL_SOURCES_DIR}/crypto/bn/bnspeed.c | |
178 ${OPENSSL_SOURCES_DIR}/crypto/des/destest.c | |
179 ${OPENSSL_SOURCES_DIR}/crypto/dh/p192.c | |
180 ${OPENSSL_SOURCES_DIR}/crypto/dh/p512.c | |
181 ${OPENSSL_SOURCES_DIR}/crypto/dh/p1024.c | |
182 ${OPENSSL_SOURCES_DIR}/crypto/des/rpw.c | |
183 ${OPENSSL_SOURCES_DIR}/ssl/ssltest.c | |
184 ${OPENSSL_SOURCES_DIR}/crypto/dsa/dsagen.c | |
185 ${OPENSSL_SOURCES_DIR}/crypto/dsa/dsatest.c | |
186 ${OPENSSL_SOURCES_DIR}/crypto/dh/dhtest.c | |
187 ${OPENSSL_SOURCES_DIR}/crypto/pqueue/pq_test.c | |
188 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c | |
189 | |
190 ${OPENSSL_SOURCES_DIR}/crypto/evp/evp_extra_test.c | |
191 ${OPENSSL_SOURCES_DIR}/crypto/evp/verify_extra_test.c | |
192 ${OPENSSL_SOURCES_DIR}/crypto/x509/verify_extra_test.c | |
193 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3prin.c | |
194 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3nametest.c | |
195 ${OPENSSL_SOURCES_DIR}/crypto/constant_time_test.c | |
196 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c | |
197 | |
198 ${OPENSSL_SOURCES_DIR}/ssl/heartbeat_test.c | |
199 ) | |
200 | |
201 | |
202 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
203 set_source_files_properties( | |
204 ${OPENSSL_SOURCES} | |
205 PROPERTIES COMPILE_DEFINITIONS | |
206 "OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN") | |
207 | |
208 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
209 execute_process( | |
210 COMMAND ${PATCH_EXECUTABLE} -N ui_openssl.c -i ${ORTHANC_ROOT}/Resources/Patches/openssl-lsb.diff | |
211 WORKING_DIRECTORY ${OPENSSL_SOURCES_DIR}/crypto/ui | |
212 RESULT_VARIABLE Failure | |
213 ) | |
214 | |
215 if (Failure AND FirstRun) | |
216 message(FATAL_ERROR "Error while patching a file") | |
217 endif() | |
218 endif() | |
219 | |
220 source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*) | |
221 | |
222 else() | |
223 include(FindOpenSSL) | |
224 | |
225 if (NOT ${OPENSSL_FOUND}) | |
226 message(FATAL_ERROR "Unable to find OpenSSL") | |
227 endif() | |
228 | |
229 include_directories(${OPENSSL_INCLUDE_DIR}) | |
230 link_libraries(${OPENSSL_LIBRARIES}) | |
231 endif() | |
232 endif() | 230 endif() |