annotate OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-3.0.cmake @ 5640:f7adfb22e20e

updated copyright, as Orthanc Team now replaces Osimis
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 May 2024 21:19:57 +0200
parents 0a74634073c0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5512
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5512
diff changeset
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5512
diff changeset
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # This program is free software: you can redistribute it and/or
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # modify it under the terms of the GNU Lesser General Public License
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # as published by the Free Software Foundation, either version 3 of
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # the License, or (at your option) any later version.
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 #
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # Lesser General Public License for more details.
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 #
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # You should have received a copy of the GNU Lesser General Public
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # License along with this program. If not, see
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 # <http://www.gnu.org/licenses/>.
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 set(OPENSSL_VERSION_MAJOR 3)
5228
993a6b23f032 upgraded to openssl 3.1.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5070
diff changeset
24 set(OPENSSL_VERSION_MINOR 1)
5502
834be222605b upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5434
diff changeset
25 set(OPENSSL_VERSION_PATCH 4)
4861
d1aae7c3dd5d upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4705
diff changeset
26 set(OPENSSL_VERSION_PRE_RELEASE "")
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set(OPENSSL_VERSION_FULL "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}${OPENSSL_VERSION_PRE_RELEASE}")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-${OPENSSL_VERSION_FULL})
5434
aa1c09fa6632 changed location of third-party downloads
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5432
diff changeset
29 SET(OPENSSL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/openssl-${OPENSSL_VERSION_FULL}.tar.gz")
5502
834be222605b upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5434
diff changeset
30 SET(OPENSSL_MD5 "653ad58812c751b887e8ec37e02bba70")
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 set(FirstRun OFF)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 else()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 set(FirstRun ON)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 if (FirstRun)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 # Apply the patches
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 execute_process(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
4861
d1aae7c3dd5d upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4705
diff changeset
45 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-${OPENSSL_VERSION_FULL}.patch
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 RESULT_VARIABLE Failure
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 if (Failure)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 message(FATAL_ERROR "Error while patching a file")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 execute_process(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 COMMAND ${PYTHON_EXECUTABLE}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ${CMAKE_CURRENT_LIST_DIR}/../Patches/OpenSSL-ConfigureHeaders.py
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 "${OPENSSL_SOURCES_DIR}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 RESULT_VARIABLE Failure
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 if (Failure)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 message(FATAL_ERROR "Error while configuring the OpenSSL headers")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 file(WRITE ${OPENSSL_SOURCES_DIR}/include/openssl/opensslv.h "")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 file(WRITE ${OPENSSL_SOURCES_DIR}/include/crypto/bn_conf.h "")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 file(WRITE ${OPENSSL_SOURCES_DIR}/include/crypto/dso_conf.h "")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h "
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 #define DATE \"\"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 #define PLATFORM \"\"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 #define compiler_flags \"\"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 ")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 else()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 message("The patches for OpenSSL have already been applied")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 if (OPENSSL_VERSION_PRE_RELEASE STREQUAL "")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 set(VERSION_VERSION_OFFSET 0)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 else()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 set(VERSION_VERSION_OFFSET 15)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
4861
d1aae7c3dd5d upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4705
diff changeset
86 math(EXPR OPENSSL_CONFIGURED_API "${OPENSSL_VERSION_MAJOR} * 10000 + ${OPENSSL_VERSION_MINOR} * 100")
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 # This macro is normally defined in "opensslv.h.in"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 math(EXPR OPENSSL_VERSION_NUMBER "(${OPENSSL_VERSION_MAJOR} << 28) + (${OPENSSL_VERSION_MINOR} << 20) + (${OPENSSL_VERSION_PATCH} << 4) + ${VERSION_VERSION_OFFSET}")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 OPENSSL_DSO_EXTENSION)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 -DOPENSSL_VERSION_MAJOR=${OPENSSL_VERSION_MAJOR}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 -DOPENSSL_VERSION_MINOR=${OPENSSL_VERSION_MINOR}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 -DOPENSSL_VERSION_PATCH=${OPENSSL_VERSION_PATCH}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 -DOPENSSL_CONFIGURED_API=${OPENSSL_CONFIGURED_API}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 -DOPENSSL_VERSION_NUMBER=${OPENSSL_VERSION_NUMBER}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 -DOPENSSL_VERSION_PRE_RELEASE="${OPENSSL_VERSION_PRE_RELEASE}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 -DOPENSSL_VERSION_BUILD_METADATA=""
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 -DOPENSSL_VERSION_TEXT="OpenSSL ${OPENSSL_VERSION_FULL}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 -DOPENSSL_VERSION_STR="${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 -DOPENSSL_FULL_VERSION_STR="${OPENSSL_VERSION_FULL}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 -DDSO_EXTENSION="${OPENSSL_DSO_EXTENSION}"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 -DOPENSSLDIR="/usr/local/ssl"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 -DMODULESDIR="" # TODO
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 -DOPENSSL_BUILDING_OPENSSL
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 -DOPENSSL_THREADS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 -DOPENSSL_IA32_SSE2
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 -DOPENSSL_NO_AFALGENG
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 -DOPENSSL_NO_ASM
4867
82612f07226a added -DOPENSSL_NO_CHACHA
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
115 -DOPENSSL_NO_CHACHA # Necessary for VC2015-64 since openssl-3.0.1
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 -DOPENSSL_NO_DEVCRYPTOENG
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 -DOPENSSL_NO_DYNAMIC_ENGINE
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 -DOPENSSL_NO_EC_NISTP_64_GCC_128
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 -DOPENSSL_NO_GOST
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 -DOPENSSL_NO_RFC3779
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 -DOPENSSL_NO_SCTP
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 -DOPENSSL_NO_KTLS # TODO ?
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 include_directories(
5512
0a74634073c0 fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5502
diff changeset
128 BEFORE
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ${OPENSSL_SOURCES_DIR}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ${OPENSSL_SOURCES_DIR}/crypto/asn1
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ${OPENSSL_SOURCES_DIR}/crypto/evp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${OPENSSL_SOURCES_DIR}/crypto/include
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${OPENSSL_SOURCES_DIR}/crypto/modes
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 ${OPENSSL_SOURCES_DIR}/include
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ${OPENSSL_SOURCES_DIR}/providers/common/include
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 ${OPENSSL_SOURCES_DIR}/providers/implementations/include
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 set(OPENSSL_SOURCES_SUBDIRS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ## Assembly is disabled
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 # ${OPENSSL_SOURCES_DIR}/crypto/aes/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 # ${OPENSSL_SOURCES_DIR}/crypto/bf/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 # ${OPENSSL_SOURCES_DIR}/crypto/bn/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 # ${OPENSSL_SOURCES_DIR}/crypto/camellia/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 # ${OPENSSL_SOURCES_DIR}/crypto/cast/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 # ${OPENSSL_SOURCES_DIR}/crypto/chacha/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 # ${OPENSSL_SOURCES_DIR}/crypto/des/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 # ${OPENSSL_SOURCES_DIR}/crypto/ec/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 # ${OPENSSL_SOURCES_DIR}/crypto/md5/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 # ${OPENSSL_SOURCES_DIR}/crypto/modes/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 # ${OPENSSL_SOURCES_DIR}/crypto/poly1305/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 # ${OPENSSL_SOURCES_DIR}/crypto/rc4/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 # ${OPENSSL_SOURCES_DIR}/crypto/rc5/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 # ${OPENSSL_SOURCES_DIR}/crypto/ripemd/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 # ${OPENSSL_SOURCES_DIR}/crypto/sha/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 # ${OPENSSL_SOURCES_DIR}/crypto/whrlpool/asm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ${OPENSSL_SOURCES_DIR}/crypto
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${OPENSSL_SOURCES_DIR}/crypto/aes
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${OPENSSL_SOURCES_DIR}/crypto/aria
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${OPENSSL_SOURCES_DIR}/crypto/asn1
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${OPENSSL_SOURCES_DIR}/crypto/async
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ${OPENSSL_SOURCES_DIR}/crypto/async/arch
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 ${OPENSSL_SOURCES_DIR}/crypto/bf
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 ${OPENSSL_SOURCES_DIR}/crypto/bio
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 ${OPENSSL_SOURCES_DIR}/crypto/bn
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ${OPENSSL_SOURCES_DIR}/crypto/buffer
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 ${OPENSSL_SOURCES_DIR}/crypto/camellia
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${OPENSSL_SOURCES_DIR}/crypto/cast
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 ${OPENSSL_SOURCES_DIR}/crypto/chacha
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 ${OPENSSL_SOURCES_DIR}/crypto/cmac
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 ${OPENSSL_SOURCES_DIR}/crypto/cmp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 ${OPENSSL_SOURCES_DIR}/crypto/cms
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ${OPENSSL_SOURCES_DIR}/crypto/comp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ${OPENSSL_SOURCES_DIR}/crypto/conf
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 ${OPENSSL_SOURCES_DIR}/crypto/crmf
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 ${OPENSSL_SOURCES_DIR}/crypto/ct
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 ${OPENSSL_SOURCES_DIR}/crypto/des
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 ${OPENSSL_SOURCES_DIR}/crypto/dh
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 ${OPENSSL_SOURCES_DIR}/crypto/dsa
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ${OPENSSL_SOURCES_DIR}/crypto/dso
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 ${OPENSSL_SOURCES_DIR}/crypto/ec
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_64
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 ${OPENSSL_SOURCES_DIR}/crypto/encode_decode
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 ${OPENSSL_SOURCES_DIR}/crypto/engine
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 ${OPENSSL_SOURCES_DIR}/crypto/err
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 ${OPENSSL_SOURCES_DIR}/crypto/ess
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 ${OPENSSL_SOURCES_DIR}/crypto/evp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 ${OPENSSL_SOURCES_DIR}/crypto/ffc
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 ${OPENSSL_SOURCES_DIR}/crypto/hmac
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 ${OPENSSL_SOURCES_DIR}/crypto/http
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 ${OPENSSL_SOURCES_DIR}/crypto/idea
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 ${OPENSSL_SOURCES_DIR}/crypto/kdf
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 ${OPENSSL_SOURCES_DIR}/crypto/lhash
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 ${OPENSSL_SOURCES_DIR}/crypto/md2
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ${OPENSSL_SOURCES_DIR}/crypto/md4
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ${OPENSSL_SOURCES_DIR}/crypto/md5
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ${OPENSSL_SOURCES_DIR}/crypto/mdc2
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 ${OPENSSL_SOURCES_DIR}/crypto/modes
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 ${OPENSSL_SOURCES_DIR}/crypto/objects
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 ${OPENSSL_SOURCES_DIR}/crypto/ocsp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 ${OPENSSL_SOURCES_DIR}/crypto/pem
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 ${OPENSSL_SOURCES_DIR}/crypto/perlasm
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 ${OPENSSL_SOURCES_DIR}/crypto/poly1305
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 ${OPENSSL_SOURCES_DIR}/crypto/property
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 ${OPENSSL_SOURCES_DIR}/crypto/rand
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 ${OPENSSL_SOURCES_DIR}/crypto/rc2
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 ${OPENSSL_SOURCES_DIR}/crypto/rc4
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 ${OPENSSL_SOURCES_DIR}/crypto/rc5
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 ${OPENSSL_SOURCES_DIR}/crypto/ripemd
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 ${OPENSSL_SOURCES_DIR}/crypto/rsa
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 ${OPENSSL_SOURCES_DIR}/crypto/seed
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 ${OPENSSL_SOURCES_DIR}/crypto/sha
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 ${OPENSSL_SOURCES_DIR}/crypto/siphash
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 ${OPENSSL_SOURCES_DIR}/crypto/sm2
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 ${OPENSSL_SOURCES_DIR}/crypto/sm3
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 ${OPENSSL_SOURCES_DIR}/crypto/sm4
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 ${OPENSSL_SOURCES_DIR}/crypto/srp
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 ${OPENSSL_SOURCES_DIR}/crypto/stack
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 ${OPENSSL_SOURCES_DIR}/crypto/store
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 ${OPENSSL_SOURCES_DIR}/crypto/ts
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 ${OPENSSL_SOURCES_DIR}/crypto/txt_db
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 ${OPENSSL_SOURCES_DIR}/crypto/ui
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 ${OPENSSL_SOURCES_DIR}/crypto/whrlpool
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 ${OPENSSL_SOURCES_DIR}/crypto/x509
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 # ${OPENSSL_SOURCES_DIR}/providers/implementations/rands/seeding # OS-specific
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 ${OPENSSL_SOURCES_DIR}/providers
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 ${OPENSSL_SOURCES_DIR}/providers/common
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 ${OPENSSL_SOURCES_DIR}/providers/common/der
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 ${OPENSSL_SOURCES_DIR}/providers/implementations/asymciphers
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 ${OPENSSL_SOURCES_DIR}/providers/implementations/ciphers
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 ${OPENSSL_SOURCES_DIR}/providers/implementations/digests
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 ${OPENSSL_SOURCES_DIR}/providers/implementations/encode_decode
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 ${OPENSSL_SOURCES_DIR}/providers/implementations/exchange
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 ${OPENSSL_SOURCES_DIR}/providers/implementations/kdfs
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 ${OPENSSL_SOURCES_DIR}/providers/implementations/kem
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 ${OPENSSL_SOURCES_DIR}/providers/implementations/keymgmt
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 ${OPENSSL_SOURCES_DIR}/providers/implementations/macs
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 ${OPENSSL_SOURCES_DIR}/providers/implementations/rands
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 ${OPENSSL_SOURCES_DIR}/providers/implementations/signature
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 ${OPENSSL_SOURCES_DIR}/providers/implementations/storemgmt
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 ${OPENSSL_SOURCES_DIR}/ssl
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 ${OPENSSL_SOURCES_DIR}/ssl/record
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 ${OPENSSL_SOURCES_DIR}/ssl/statem
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 if (ENABLE_OPENSSL_ENGINES)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 #-DENGINESDIR="/usr/local/lib/engines-1.1" # On GNU/Linux
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 -DENGINESDIR="."
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 list(APPEND OPENSSL_SOURCES_SUBDIRS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 ${OPENSSL_SOURCES_DIR}/engines
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 ${OPENSSL_SOURCES_DIR}/crypto/engine
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 else()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 add_definitions(-DOPENSSL_NO_ENGINE)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 list(APPEND OPENSSL_SOURCES_SUBDIRS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 # EC, ECDH and ECDSA are necessary for PKCS11, and for contacting
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272 # HTTPS servers that use TLS certificate encrypted with ECDSA
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
273 # (check the output of a recent version of the "sslscan"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 # command). Until Orthanc <= 1.4.1, these features were only
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 # enabled if ENABLE_PKCS11 support was set to "ON".
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 # https://groups.google.com/d/msg/orthanc-users/2l-bhYIMEWg/oMmK33bYBgAJ
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 ${OPENSSL_SOURCES_DIR}/crypto/ec
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 ${OPENSSL_SOURCES_DIR}/crypto/ecdh
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 foreach(d ${OPENSSL_SOURCES_SUBDIRS})
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 endforeach()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 list(REMOVE_ITEM OPENSSL_SOURCES
4705
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
288 # Files below are not part of the "libcrypto.a" and "libssl.a" that
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
289 # are created by compiling OpenSSL from sources
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistp224.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistp256.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistp521.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_s390x_nistp.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecx_s390x.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_base2_44.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 ${OPENSSL_SOURCES_DIR}/crypto/rsa/rsa_acvp_test_params.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 ${OPENSSL_SOURCES_DIR}/engines/e_devcrypto.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 ${OPENSSL_SOURCES_DIR}/engines/e_loader_attic.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 ${OPENSSL_SOURCES_DIR}/providers/common/securitycheck_fips.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 ${OPENSSL_SOURCES_DIR}/providers/implementations/macs/blake2_mac_impl.c
4705
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
311
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
312 ${OPENSSL_SOURCES_DIR}/engines/e_afalg.c # Fails on OS X and Visual Studio
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
313 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_ieee754.c # Fails on Visual Studio
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 ${OPENSSL_SOURCES_DIR}/ssl/ktls.c # TODO ?
4868
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
316
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
317 # Disable PowerPC sources
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
318 ${OPENSSL_SOURCES_DIR}/crypto/bn/bn_ppc.c
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
319 ${OPENSSL_SOURCES_DIR}/crypto/chacha/chacha_ppc.c
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
320 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_ppc.c
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
321 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_ppc.c
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
322 ${OPENSSL_SOURCES_DIR}/crypto/sha/sha_ppc.c
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
323
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
324 # Disable SPARC sources
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
325 ${OPENSSL_SOURCES_DIR}/crypto/bn/bn_sparc.c
5235
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
326
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
327 # Disable CPUID for non-x86 platforms
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
328 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
329 ${OPENSSL_SOURCES_DIR}/crypto/loongarchcap.c
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
330 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
331 ${OPENSSL_SOURCES_DIR}/crypto/riscvcap.c
5a1e81eef654 disable compilation of openssl-3.1.0/crypto/riscvcap.c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5228
diff changeset
332 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c
4868
36587ae9e0e1 fix build of openssl bignum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4862
diff changeset
333 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
4705
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
340 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" OR
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
341 APPLE)
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 list(APPEND OPENSSL_SOURCES
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 ${OPENSSL_SOURCES_DIR}/providers/implementations/rands/seeding/rand_unix.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344 )
4705
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
345 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
346 list(APPEND OPENSSL_SOURCES
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
347 ${OPENSSL_SOURCES_DIR}/providers/implementations/rands/seeding/rand_win.c
2b3db9d08fe2 fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4702
diff changeset
348 )
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
349 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
350
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 # Check out "${OPENSSL_SOURCES_DIR}/Configurations/README.md": "This
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 # is default if no option is specified, it works on any supported
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 # system." It is mandatory to define it as a macro, as it is used by
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 # all the source files that include OpenSSL (e.g. "Core/Toolbox.cpp"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 # or curl)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 add_definitions(-DTHIRTY_TWO_BIT)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 if (NOT CMAKE_COMPILER_IS_GNUCXX OR
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 # Disable the use of a gcc extension, that is neither available on
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 # MinGW, nor on LSB
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366 -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372 set(OPENSSL_DEFINITIONS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 "${OPENSSL_DEFINITIONS};OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;NO_WINDOWS_BRAINDEATH")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375 if (ENABLE_OPENSSL_ENGINES)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 link_libraries(crypt32)
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
377 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
378
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
379 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
383 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
384 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
385 # In order for "crypto/mem_sec.c" to compile on LSB
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
386 -DOPENSSL_NO_SECURE_MEMORY
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
387
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
388 # The "OPENSSL_RAND_SEED_OS" value implies a syscall() to
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
389 # "__NR_getrandom" (i.e. system call "getentropy(2)") in
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
390 # "rand_unix.c", which is not available in LSB.
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
391 -DOPENSSL_RAND_SEED_DEVRANDOM
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
392
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
393 # If "OPENSSL_NO_ERR" is not defined, the PostgreSQL plugin
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
394 # crashes with segmentation fault in function
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
395 # "build_SYS_str_reasons()", that is called from
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
396 # "OPENSSL_init_ssl()"
5432
59e3b6f8c5be migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5271
diff changeset
397 # https://orthanc.uclouvain.be/bugs/show_bug.cgi?id=193
4702
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
398 -DOPENSSL_NO_ERR
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
399 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
400
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
401 else()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
402 # Fixes error "OpenSSL error: error:2406C06E:random number
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
403 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
404 # present in Orthanc 1.6.0, if statically linking on Ubuntu 18.04
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 add_definitions(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406 -DOPENSSL_RAND_SEED_OS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
407 )
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
408 endif()
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
410
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
411 set_source_files_properties(
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
412 ${OPENSSL_SOURCES}
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 PROPERTIES COMPILE_DEFINITIONS
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414 "${OPENSSL_DEFINITIONS};DSO_NONE"
312e0e29de90 compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
415 )