Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/OpenSslConfiguration.cmake @ 4836:ec1e9571b645
document number of dimensions in numpy arrays
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 27 Nov 2021 12:31:51 +0100 |
parents | 7053502fbf97 |
children | 2e71a08eea15 43e613a7756b |
rev | line source |
---|---|
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
4831
7053502fbf97
added copyright UCLouvain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4526
diff
changeset
|
5 # Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
6 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
7 # This program is free software: you can redistribute it and/or |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 # modify it under the terms of the GNU Lesser General Public License |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 # as published by the Free Software Foundation, either version 3 of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
11 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, but |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
16 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 # You should have received a copy of the GNU Lesser General Public |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
20 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
21 |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
22 if (STATIC_BUILD OR NOT USE_SYSTEM_OPENSSL) |
3720
faa695f433d5
upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3287
diff
changeset
|
23 if (OPENSSL_STATIC_VERSION STREQUAL "1.0.2") |
faa695f433d5
upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3287
diff
changeset
|
24 include(${CMAKE_CURRENT_LIST_DIR}/OpenSslConfigurationStatic-1.0.2.cmake) |
faa695f433d5
upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3287
diff
changeset
|
25 elseif (OPENSSL_STATIC_VERSION STREQUAL "1.1.1") |
faa695f433d5
upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3287
diff
changeset
|
26 include(${CMAKE_CURRENT_LIST_DIR}/OpenSslConfigurationStatic-1.1.1.cmake) |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
27 else() |
3720
faa695f433d5
upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3287
diff
changeset
|
28 message(FATAL_ERROR "Unsupported version of OpenSSL: ${OPENSSL_STATIC_VERSION}") |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
29 endif() |
2022
fefbe71c2272
Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1919
diff
changeset
|
30 |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
31 source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*) |
735 | 32 |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
33 elseif (CMAKE_CROSSCOMPILING AND |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
34 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
35 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
36 CHECK_INCLUDE_FILE_CXX(openssl/opensslv.h HAVE_OPENSSL_H) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
37 if (NOT HAVE_OPENSSL_H) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
38 message(FATAL_ERROR "Please install the libopenssl-dev package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
39 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
40 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
41 CHECK_LIBRARY_EXISTS(crypto "OPENSSL_init" "" HAVE_OPENSSL_CRYPTO_LIB) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
42 if (NOT HAVE_OPENSSL_CRYPTO_LIB) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
43 message(FATAL_ERROR "Please install the libopenssl package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
44 endif() |
4526
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
45 |
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
46 # The "SSL_library_init" is for OpenSSL <= 1.0.2, whereas |
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
47 # "OPENSSL_init_ssl" is for OpenSSL >= 1.1.0 |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
48 CHECK_LIBRARY_EXISTS(ssl "SSL_library_init" "" HAVE_OPENSSL_SSL_LIB) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
49 if (NOT HAVE_OPENSSL_SSL_LIB) |
4526
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
50 CHECK_LIBRARY_EXISTS(ssl "OPENSSL_init_ssl" "" HAVE_OPENSSL_SSL_LIB_2) |
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
51 if (NOT HAVE_OPENSSL_SSL_LIB_2) |
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
52 message(FATAL_ERROR "Please install the libopenssl package") |
59b667dd58a8
fix cross-compilation for big endian on Debian 10
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
53 endif() |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
54 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
55 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
56 link_libraries(crypto ssl) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3720
diff
changeset
|
57 |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
58 else() |
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
59 include(FindOpenSSL) |
735 | 60 |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
61 if (NOT ${OPENSSL_FOUND}) |
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
62 message(FATAL_ERROR "Unable to find OpenSSL") |
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
63 endif() |
2022
fefbe71c2272
Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1919
diff
changeset
|
64 |
2379
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
65 include_directories(${OPENSSL_INCLUDE_DIR}) |
4900688827a8
reorganization in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2367
diff
changeset
|
66 link_libraries(${OPENSSL_LIBRARIES}) |
735 | 67 endif() |