Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-3.0.cmake @ 4785:61da49321754 openssl-3.x
integration mainline->openssl-3.x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Aug 2021 22:21:24 +0200 |
parents | 2b3db9d08fe2 |
children | d1aae7c3dd5d |
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 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 # |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 # 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
|
7 # 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
|
8 # 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
|
9 # 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
|
10 # |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # 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
|
12 # 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
|
13 # 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
|
14 # Lesser General Public License for more details. |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 # |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 # 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
|
17 # 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
|
18 # <http://www.gnu.org/licenses/>. |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 set(OPENSSL_VERSION_MAJOR 3) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 set(OPENSSL_VERSION_MINOR 0) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 set(OPENSSL_VERSION_PATCH 0) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 set(OPENSSL_VERSION_PRE_RELEASE "-beta1") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 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
|
26 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-${OPENSSL_VERSION_FULL}) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-${OPENSSL_VERSION_FULL}.tar.gz") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 SET(OPENSSL_MD5 "437b21bd0e09fbaa0a89151c6c0130a7") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 set(FirstRun OFF) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 else() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 set(FirstRun ON) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 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
|
37 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 if (FirstRun) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 # Apply the patches |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 execute_process( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-3.0.0-beta1.patch |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 RESULT_VARIABLE Failure |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 if (Failure) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 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
|
50 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 execute_process( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 COMMAND ${PYTHON_EXECUTABLE} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 ${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
|
55 "${OPENSSL_SOURCES_DIR}" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 RESULT_VARIABLE Failure |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 if (Failure) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 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
|
61 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 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
|
68 #define DATE \"\" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 #define PLATFORM \"\" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 #define compiler_flags \"\" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 ") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 else() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 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
|
75 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 if (OPENSSL_VERSION_PRE_RELEASE STREQUAL "") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 set(VERSION_VERSION_OFFSET 0) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 else() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 set(VERSION_VERSION_OFFSET 15) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 math(EXPR OPENSSL_CONFIGURED_API "${OPENSSL_VERSION_MAJOR} * 10000 + ${OPENSSL_VERSION_MINOR} * 100 + ${OPENSSL_VERSION_PATCH}") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 # 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
|
87 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
|
88 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 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
|
90 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 -DOPENSSL_VERSION_MAJOR=${OPENSSL_VERSION_MAJOR} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 -DOPENSSL_VERSION_MINOR=${OPENSSL_VERSION_MINOR} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 -DOPENSSL_VERSION_PATCH=${OPENSSL_VERSION_PATCH} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 -DOPENSSL_CONFIGURED_API=${OPENSSL_CONFIGURED_API} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 -DOPENSSL_VERSION_NUMBER=${OPENSSL_VERSION_NUMBER} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 -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
|
98 -DOPENSSL_VERSION_BUILD_METADATA="" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 -DOPENSSL_VERSION_TEXT="OpenSSL ${OPENSSL_VERSION_FULL}" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 -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
|
101 -DOPENSSL_FULL_VERSION_STR="${OPENSSL_VERSION_FULL}" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 -DDSO_EXTENSION="${OPENSSL_DSO_EXTENSION}" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 -DOPENSSLDIR="/usr/local/ssl" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 -DMODULESDIR="" # TODO |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 -DOPENSSL_BUILDING_OPENSSL |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 -DOPENSSL_THREADS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 -DOPENSSL_IA32_SSE2 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 -DOPENSSL_NO_AFALGENG |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 -DOPENSSL_NO_ASM |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 -DOPENSSL_NO_DEVCRYPTOENG |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 -DOPENSSL_NO_DYNAMIC_ENGINE |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 -DOPENSSL_NO_EC_NISTP_64_GCC_128 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 -DOPENSSL_NO_GOST |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 -DOPENSSL_NO_RFC3779 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 -DOPENSSL_NO_SCTP |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 -DOPENSSL_NO_KTLS # TODO ? |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 ) |
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 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 include_directories( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 ${OPENSSL_SOURCES_DIR} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 ${OPENSSL_SOURCES_DIR}/crypto/asn1 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 ${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
|
129 ${OPENSSL_SOURCES_DIR}/crypto/evp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 ${OPENSSL_SOURCES_DIR}/crypto/include |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 ${OPENSSL_SOURCES_DIR}/crypto/modes |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 ${OPENSSL_SOURCES_DIR}/include |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 ${OPENSSL_SOURCES_DIR}/providers/common/include |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 ${OPENSSL_SOURCES_DIR}/providers/implementations/include |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 set(OPENSSL_SOURCES_SUBDIRS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 ## Assembly is disabled |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 # ${OPENSSL_SOURCES_DIR}/crypto/aes/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 # ${OPENSSL_SOURCES_DIR}/crypto/bf/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 # ${OPENSSL_SOURCES_DIR}/crypto/bn/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 # ${OPENSSL_SOURCES_DIR}/crypto/camellia/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 # ${OPENSSL_SOURCES_DIR}/crypto/cast/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 # ${OPENSSL_SOURCES_DIR}/crypto/chacha/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 # ${OPENSSL_SOURCES_DIR}/crypto/des/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 # ${OPENSSL_SOURCES_DIR}/crypto/ec/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 # ${OPENSSL_SOURCES_DIR}/crypto/md5/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 # ${OPENSSL_SOURCES_DIR}/crypto/modes/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 # ${OPENSSL_SOURCES_DIR}/crypto/poly1305/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 # ${OPENSSL_SOURCES_DIR}/crypto/rc4/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 # ${OPENSSL_SOURCES_DIR}/crypto/rc5/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 # ${OPENSSL_SOURCES_DIR}/crypto/ripemd/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 # ${OPENSSL_SOURCES_DIR}/crypto/sha/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 # ${OPENSSL_SOURCES_DIR}/crypto/whrlpool/asm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 ${OPENSSL_SOURCES_DIR}/crypto |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 ${OPENSSL_SOURCES_DIR}/crypto/aes |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 ${OPENSSL_SOURCES_DIR}/crypto/aria |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 ${OPENSSL_SOURCES_DIR}/crypto/asn1 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 ${OPENSSL_SOURCES_DIR}/crypto/async |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 ${OPENSSL_SOURCES_DIR}/crypto/async/arch |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 ${OPENSSL_SOURCES_DIR}/crypto/bf |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 ${OPENSSL_SOURCES_DIR}/crypto/bio |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 ${OPENSSL_SOURCES_DIR}/crypto/bn |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 ${OPENSSL_SOURCES_DIR}/crypto/buffer |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 ${OPENSSL_SOURCES_DIR}/crypto/camellia |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 ${OPENSSL_SOURCES_DIR}/crypto/cast |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 ${OPENSSL_SOURCES_DIR}/crypto/chacha |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 ${OPENSSL_SOURCES_DIR}/crypto/cmac |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 ${OPENSSL_SOURCES_DIR}/crypto/cmp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 ${OPENSSL_SOURCES_DIR}/crypto/cms |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 ${OPENSSL_SOURCES_DIR}/crypto/comp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 ${OPENSSL_SOURCES_DIR}/crypto/conf |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 ${OPENSSL_SOURCES_DIR}/crypto/crmf |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 ${OPENSSL_SOURCES_DIR}/crypto/ct |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 ${OPENSSL_SOURCES_DIR}/crypto/des |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 ${OPENSSL_SOURCES_DIR}/crypto/dh |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 ${OPENSSL_SOURCES_DIR}/crypto/dsa |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 ${OPENSSL_SOURCES_DIR}/crypto/dso |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 ${OPENSSL_SOURCES_DIR}/crypto/ec |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 ${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
|
184 ${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
|
185 ${OPENSSL_SOURCES_DIR}/crypto/encode_decode |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 ${OPENSSL_SOURCES_DIR}/crypto/engine |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 ${OPENSSL_SOURCES_DIR}/crypto/err |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 ${OPENSSL_SOURCES_DIR}/crypto/ess |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 ${OPENSSL_SOURCES_DIR}/crypto/evp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 ${OPENSSL_SOURCES_DIR}/crypto/ffc |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 ${OPENSSL_SOURCES_DIR}/crypto/hmac |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 ${OPENSSL_SOURCES_DIR}/crypto/http |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 ${OPENSSL_SOURCES_DIR}/crypto/idea |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 ${OPENSSL_SOURCES_DIR}/crypto/kdf |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 ${OPENSSL_SOURCES_DIR}/crypto/lhash |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 ${OPENSSL_SOURCES_DIR}/crypto/md2 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 ${OPENSSL_SOURCES_DIR}/crypto/md4 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 ${OPENSSL_SOURCES_DIR}/crypto/md5 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 ${OPENSSL_SOURCES_DIR}/crypto/mdc2 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 ${OPENSSL_SOURCES_DIR}/crypto/modes |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 ${OPENSSL_SOURCES_DIR}/crypto/objects |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 ${OPENSSL_SOURCES_DIR}/crypto/ocsp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 ${OPENSSL_SOURCES_DIR}/crypto/pem |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 ${OPENSSL_SOURCES_DIR}/crypto/perlasm |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
205 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 ${OPENSSL_SOURCES_DIR}/crypto/poly1305 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 ${OPENSSL_SOURCES_DIR}/crypto/property |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 ${OPENSSL_SOURCES_DIR}/crypto/rand |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 ${OPENSSL_SOURCES_DIR}/crypto/rc2 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 ${OPENSSL_SOURCES_DIR}/crypto/rc4 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 ${OPENSSL_SOURCES_DIR}/crypto/rc5 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 ${OPENSSL_SOURCES_DIR}/crypto/ripemd |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 ${OPENSSL_SOURCES_DIR}/crypto/rsa |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
215 ${OPENSSL_SOURCES_DIR}/crypto/seed |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 ${OPENSSL_SOURCES_DIR}/crypto/sha |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 ${OPENSSL_SOURCES_DIR}/crypto/siphash |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
218 ${OPENSSL_SOURCES_DIR}/crypto/sm2 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 ${OPENSSL_SOURCES_DIR}/crypto/sm3 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 ${OPENSSL_SOURCES_DIR}/crypto/sm4 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 ${OPENSSL_SOURCES_DIR}/crypto/srp |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 ${OPENSSL_SOURCES_DIR}/crypto/stack |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
223 ${OPENSSL_SOURCES_DIR}/crypto/store |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
224 ${OPENSSL_SOURCES_DIR}/crypto/ts |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 ${OPENSSL_SOURCES_DIR}/crypto/txt_db |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 ${OPENSSL_SOURCES_DIR}/crypto/ui |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
227 ${OPENSSL_SOURCES_DIR}/crypto/whrlpool |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
228 ${OPENSSL_SOURCES_DIR}/crypto/x509 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
230 # ${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
|
231 ${OPENSSL_SOURCES_DIR}/providers |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 ${OPENSSL_SOURCES_DIR}/providers/common |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 ${OPENSSL_SOURCES_DIR}/providers/common/der |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 ${OPENSSL_SOURCES_DIR}/providers/implementations/asymciphers |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
235 ${OPENSSL_SOURCES_DIR}/providers/implementations/ciphers |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 ${OPENSSL_SOURCES_DIR}/providers/implementations/digests |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 ${OPENSSL_SOURCES_DIR}/providers/implementations/encode_decode |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
238 ${OPENSSL_SOURCES_DIR}/providers/implementations/exchange |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
239 ${OPENSSL_SOURCES_DIR}/providers/implementations/kdfs |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
240 ${OPENSSL_SOURCES_DIR}/providers/implementations/kem |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
241 ${OPENSSL_SOURCES_DIR}/providers/implementations/keymgmt |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
242 ${OPENSSL_SOURCES_DIR}/providers/implementations/macs |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
243 ${OPENSSL_SOURCES_DIR}/providers/implementations/rands |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
244 ${OPENSSL_SOURCES_DIR}/providers/implementations/signature |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
245 ${OPENSSL_SOURCES_DIR}/providers/implementations/storemgmt |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
246 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
247 ${OPENSSL_SOURCES_DIR}/ssl |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
248 ${OPENSSL_SOURCES_DIR}/ssl/record |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
249 ${OPENSSL_SOURCES_DIR}/ssl/statem |
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 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
252 if (ENABLE_OPENSSL_ENGINES) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
253 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
254 #-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
|
255 -DENGINESDIR="." |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
256 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
257 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
258 list(APPEND OPENSSL_SOURCES_SUBDIRS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
259 ${OPENSSL_SOURCES_DIR}/engines |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
260 ${OPENSSL_SOURCES_DIR}/crypto/engine |
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 else() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
263 add_definitions(-DOPENSSL_NO_ENGINE) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
264 endif() |
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 list(APPEND OPENSSL_SOURCES_SUBDIRS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
267 # 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
|
268 # 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
|
269 # (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
|
270 # 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
|
271 # 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
|
272 # 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
|
273 ${OPENSSL_SOURCES_DIR}/crypto/ec |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
274 ${OPENSSL_SOURCES_DIR}/crypto/ecdh |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
275 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
276 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
277 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
278 foreach(d ${OPENSSL_SOURCES_SUBDIRS}) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
279 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
280 endforeach() |
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 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
283 list(REMOVE_ITEM OPENSSL_SOURCES |
4705
2b3db9d08fe2
fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4702
diff
changeset
|
284 # 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
|
285 # 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
|
286 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
287 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
288 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
289 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
290 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
291 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
292 ${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
|
293 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
294 ${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
|
295 ${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
|
296 ${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
|
297 ${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
|
298 ${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
|
299 ${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
|
300 ${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
|
301 ${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
|
302 ${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
|
303 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
304 ${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
|
305 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
306 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.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 ? |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
316 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
317 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
318 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
319 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
320 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
321 ${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
|
322 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" OR |
2b3db9d08fe2
fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4702
diff
changeset
|
323 APPLE) |
4702
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
324 list(APPEND OPENSSL_SOURCES |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
325 ${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
|
326 ) |
4705
2b3db9d08fe2
fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4702
diff
changeset
|
327 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") |
2b3db9d08fe2
fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4702
diff
changeset
|
328 list(APPEND OPENSSL_SOURCES |
2b3db9d08fe2
fixes for OS X and Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4702
diff
changeset
|
329 ${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
|
330 ) |
4702
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
331 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
332 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
333 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
334 # 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
|
335 # 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
|
336 # 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
|
337 # 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
|
338 # or curl) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
339 add_definitions(-DTHIRTY_TWO_BIT) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
340 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
341 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
342 if (NOT CMAKE_COMPILER_IS_GNUCXX OR |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
343 "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
344 "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
345 # 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
|
346 # MinGW, nor on LSB |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
347 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
348 -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
349 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
350 endif() |
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 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
353 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
354 set(OPENSSL_DEFINITIONS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
355 "${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
|
356 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
357 if (ENABLE_OPENSSL_ENGINES) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
358 link_libraries(crypt32) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
359 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
360 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
361 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
362 -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
|
363 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
364 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
365 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
366 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
367 # 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
|
368 -DOPENSSL_NO_SECURE_MEMORY |
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 # 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
|
371 # "__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
|
372 # "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
|
373 -DOPENSSL_RAND_SEED_DEVRANDOM |
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 "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
|
376 # crashes with segmentation fault in function |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
377 # "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
|
378 # "OPENSSL_init_ssl()" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
379 # https://bugs.orthanc-server.com/show_bug.cgi?id=193 |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
380 -DOPENSSL_NO_ERR |
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 else() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
384 # 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
|
385 # 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
|
386 # 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
|
387 add_definitions( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
388 -DOPENSSL_RAND_SEED_OS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
389 ) |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
390 endif() |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
391 |
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 set_source_files_properties( |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
394 ${OPENSSL_SOURCES} |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
395 PROPERTIES COMPILE_DEFINITIONS |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
396 "${OPENSSL_DEFINITIONS};DSO_NONE" |
312e0e29de90
compilation using openssl-3.0.0-beta1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
397 ) |