annotate OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 4544:ae63b301d522 Orthanc-1.7.4

close branch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Mar 2021 16:52:26 +0100
parents 304842a0d152
children 781f53eee856
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
3 # Department, University Hospital of Liege, Belgium
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
5 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
6 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
7 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
9 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
10 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
11 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
14 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
15 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
16 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
17 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
18 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
19
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
20
3890
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
21 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.1.1g)
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
22 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-1.1.1g.tar.gz")
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
23 SET(OPENSSL_MD5 "76766e98997660138cdaf13a187bd234")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(FirstRun OFF)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(FirstRun ON)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 if (FirstRun)
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
34 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h "
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
35 #define DATE \"\"
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
36 #define PLATFORM \"\"
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
37 #define compiler_flags \"\"
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ")
3803
e9834343d327 upgrade to openssl 1.1.1f
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3802
diff changeset
39 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/bn_conf.h "")
e9834343d327 upgrade to openssl 1.1.1f
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3802
diff changeset
40 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/dso_conf.h "")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
42 configure_file(
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
43 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-1.1.1-conf.h.in
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
44 ${OPENSSL_SOURCES_DIR}/include/openssl/opensslconf.h
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
45 )
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
46
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 # Apply the patches
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 execute_process(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
50 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-1.1.1g.patch
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 RESULT_VARIABLE Failure
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 if (Failure)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 message(FATAL_ERROR "Error while patching a file")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 message("The patches for OpenSSL have already been applied")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 add_definitions(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 -DOPENSSL_THREADS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 -DOPENSSL_IA32_SSE2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 -DOPENSSL_NO_ASM
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 -DOPENSSL_NO_DYNAMIC_ENGINE
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
67 -DOPENSSL_NO_DEVCRYPTOENG
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 -DOPENSSL_NO_BF
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 -DOPENSSL_NO_CAMELLIA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 -DOPENSSL_NO_CAST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 -DOPENSSL_NO_EC_NISTP_64_GCC_128
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 -DOPENSSL_NO_GMP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 -DOPENSSL_NO_GOST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 -DOPENSSL_NO_HW
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 -DOPENSSL_NO_JPAKE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 -DOPENSSL_NO_IDEA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 -DOPENSSL_NO_KRB5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 -DOPENSSL_NO_MD2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 -DOPENSSL_NO_MDC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 #-DOPENSSL_NO_MD4 # MD4 is necessary for MariaDB/MySQL client
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 -DOPENSSL_NO_RC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 -DOPENSSL_NO_RC4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 -DOPENSSL_NO_RC5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 -DOPENSSL_NO_RFC3779
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 -DOPENSSL_NO_SCTP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 -DOPENSSL_NO_STORE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 -DOPENSSL_NO_SEED
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 -DOPENSSL_NO_WHIRLPOOL
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 -DOPENSSL_NO_RIPEMD
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
91 -DOPENSSL_NO_AFALGENG
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 -DOPENSSLDIR="/usr/local/ssl"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 include_directories(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 ${OPENSSL_SOURCES_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 ${OPENSSL_SOURCES_DIR}/crypto/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 ${OPENSSL_SOURCES_DIR}/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 set(OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 ${OPENSSL_SOURCES_DIR}/crypto/aes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 ${OPENSSL_SOURCES_DIR}/crypto/aria
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 ${OPENSSL_SOURCES_DIR}/crypto/async
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 ${OPENSSL_SOURCES_DIR}/crypto/async/arch
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 ${OPENSSL_SOURCES_DIR}/crypto/bio
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 ${OPENSSL_SOURCES_DIR}/crypto/blake2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 ${OPENSSL_SOURCES_DIR}/crypto/bn
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 ${OPENSSL_SOURCES_DIR}/crypto/buffer
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 ${OPENSSL_SOURCES_DIR}/crypto/chacha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 ${OPENSSL_SOURCES_DIR}/crypto/cmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 ${OPENSSL_SOURCES_DIR}/crypto/cms
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 ${OPENSSL_SOURCES_DIR}/crypto/comp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 ${OPENSSL_SOURCES_DIR}/crypto/conf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ${OPENSSL_SOURCES_DIR}/crypto/ct
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 ${OPENSSL_SOURCES_DIR}/crypto/des
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 ${OPENSSL_SOURCES_DIR}/crypto/dh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ${OPENSSL_SOURCES_DIR}/crypto/dsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ${OPENSSL_SOURCES_DIR}/crypto/dso
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${OPENSSL_SOURCES_DIR}/crypto/err
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 ${OPENSSL_SOURCES_DIR}/crypto/hmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ${OPENSSL_SOURCES_DIR}/crypto/kdf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 ${OPENSSL_SOURCES_DIR}/crypto/lhash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 ${OPENSSL_SOURCES_DIR}/crypto/md4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ${OPENSSL_SOURCES_DIR}/crypto/md5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ${OPENSSL_SOURCES_DIR}/crypto/objects
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ${OPENSSL_SOURCES_DIR}/crypto/ocsp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 ${OPENSSL_SOURCES_DIR}/crypto/pem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${OPENSSL_SOURCES_DIR}/crypto/poly1305
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${OPENSSL_SOURCES_DIR}/crypto/pqueue
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${OPENSSL_SOURCES_DIR}/crypto/rand
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${OPENSSL_SOURCES_DIR}/crypto/ripemd
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${OPENSSL_SOURCES_DIR}/crypto/rsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 ${OPENSSL_SOURCES_DIR}/crypto/sha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 ${OPENSSL_SOURCES_DIR}/crypto/siphash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ${OPENSSL_SOURCES_DIR}/crypto/sm2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 ${OPENSSL_SOURCES_DIR}/crypto/sm3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 ${OPENSSL_SOURCES_DIR}/crypto/sm4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${OPENSSL_SOURCES_DIR}/crypto/srp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${OPENSSL_SOURCES_DIR}/crypto/stack
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 ${OPENSSL_SOURCES_DIR}/crypto/store
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 ${OPENSSL_SOURCES_DIR}/crypto/ts
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ${OPENSSL_SOURCES_DIR}/crypto/txt_db
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${OPENSSL_SOURCES_DIR}/crypto/ui
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${OPENSSL_SOURCES_DIR}/crypto/x509
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${OPENSSL_SOURCES_DIR}/crypto/x509v3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${OPENSSL_SOURCES_DIR}/ssl
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ${OPENSSL_SOURCES_DIR}/ssl/record
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 ${OPENSSL_SOURCES_DIR}/ssl/statem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 if (ENABLE_OPENSSL_ENGINES)
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
171 add_definitions(
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
172 #-DENGINESDIR="/usr/local/lib/engines-1.1" # On GNU/Linux
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
173 -DENGINESDIR="."
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
174 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
176 list(APPEND OPENSSL_SOURCES_SUBDIRS
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
177 ${OPENSSL_SOURCES_DIR}/engines
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
178 ${OPENSSL_SOURCES_DIR}/crypto/engine
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
179 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 add_definitions(-DOPENSSL_NO_ENGINE)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 list(APPEND OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 # EC, ECDH and ECDSA are necessary for PKCS11, and for contacting
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 # HTTPS servers that use TLS certificate encrypted with ECDSA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 # (check the output of a recent version of the "sslscan"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 # command). Until Orthanc <= 1.4.1, these features were only
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 # enabled if ENABLE_PKCS11 support was set to "ON".
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 # https://groups.google.com/d/msg/orthanc-users/2l-bhYIMEWg/oMmK33bYBgAJ
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 ${OPENSSL_SOURCES_DIR}/crypto/ecdh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 foreach(d ${OPENSSL_SOURCES_SUBDIRS})
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 endforeach()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 list(REMOVE_ITEM OPENSSL_SOURCES
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 ${OPENSSL_SOURCES_DIR}/crypto/engine/eng_devcrypto.c
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
214 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_base2_44.c # Cannot be compiled with MinGW
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
215 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_ieee754.c # Cannot be compiled with MinGW
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
219 ${OPENSSL_SOURCES_DIR}/engines/e_afalg.c # Cannot be compiled with MinGW
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
222 # Check out "${OPENSSL_SOURCES_DIR}/Configurations/README": "This is
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
223 # default if no option is specified, it works on any supported
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
224 # system." It is mandatory to define it as a macro, as it is used by
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
225 # all the source files that include OpenSSL (e.g. "Core/Toolbox.cpp"
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
226 # or curl)
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
227 add_definitions(-DTHIRTY_TWO_BIT)
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
229
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
230 if (NOT CMAKE_COMPILER_IS_GNUCXX OR
3726
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
231 "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
232 "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
3726
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
233 # Disable the use of a gcc extension, that is neither available on
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
234 # MinGW, nor on LSB
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
235 add_definitions(
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
236 -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
237 )
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
238 endif()
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
239
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
240
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 set(OPENSSL_DEFINITIONS
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
243 "${OPENSSL_DEFINITIONS};OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;NO_WINDOWS_BRAINDEATH")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
245 if (ENABLE_OPENSSL_ENGINES)
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
246 link_libraries(crypt32)
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
247 endif()
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
248
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
249 add_definitions(
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
250 -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
251 )
3724
f29a75a3190a fix for msvc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3723
diff changeset
252
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
253 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
254 add_definitions(
3805
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
255 # In order for "crypto/mem_sec.c" to compile on LSB
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
256 -DOPENSSL_NO_SECURE_MEMORY
3805
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
257
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
258 # The "OPENSSL_RAND_SEED_OS" value implies a syscall() to
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
259 # "__NR_getrandom" (i.e. system call "getentropy(2)") in
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
260 # "rand_unix.c", which is not available in LSB.
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
261 -DOPENSSL_RAND_SEED_DEVRANDOM
3802
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
262 )
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
263
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
264 else()
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
265 # Fixes error "OpenSSL error: error:2406C06E:random number
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
266 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
267 # present in Orthanc 1.6.0, if statically linking on Ubuntu 18.04
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
268 add_definitions(
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
269 -DOPENSSL_RAND_SEED_OS
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
270 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
273
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 set_source_files_properties(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 ${OPENSSL_SOURCES}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 PROPERTIES COMPILE_DEFINITIONS
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
277 "${OPENSSL_DEFINITIONS};DSO_NONE"
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 )