Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/ZlibConfiguration.cmake @ 5502:834be222605b
upgraded to OpenSSL 3.1.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Jan 2024 17:16:06 +0100 |
parents | 48b8dae6dc77 |
children | b305bc32b77d |
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 |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5434
diff
changeset
|
4 # Copyright (C) 2017-2024 Osimis S.A., Belgium |
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5434
diff
changeset
|
5 # Copyright (C) 2021-2024 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 |
735 | 22 if (STATIC_BUILD OR NOT USE_SYSTEM_ZLIB) |
2509
9d9f2d088dce
upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
23 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.11) |
5434
aa1c09fa6632
changed location of third-party downloads
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5271
diff
changeset
|
24 SET(ZLIB_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/zlib-1.2.11.tar.gz") |
2509
9d9f2d088dce
upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
25 SET(ZLIB_MD5 "1c9f62f0778697a09d36121ead88e08e") |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
26 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
27 DownloadPackage(${ZLIB_MD5} ${ZLIB_URL} "${ZLIB_SOURCES_DIR}") |
735 | 28 |
29 include_directories( | |
30 ${ZLIB_SOURCES_DIR} | |
31 ) | |
32 | |
1414 | 33 list(APPEND ZLIB_SOURCES |
735 | 34 ${ZLIB_SOURCES_DIR}/adler32.c |
35 ${ZLIB_SOURCES_DIR}/compress.c | |
36 ${ZLIB_SOURCES_DIR}/crc32.c | |
37 ${ZLIB_SOURCES_DIR}/deflate.c | |
38 ${ZLIB_SOURCES_DIR}/infback.c | |
39 ${ZLIB_SOURCES_DIR}/inffast.c | |
40 ${ZLIB_SOURCES_DIR}/inflate.c | |
41 ${ZLIB_SOURCES_DIR}/inftrees.c | |
42 ${ZLIB_SOURCES_DIR}/trees.c | |
43 ${ZLIB_SOURCES_DIR}/uncompr.c | |
44 ${ZLIB_SOURCES_DIR}/zutil.c | |
45 ) | |
46 | |
4017
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
47 if (NOT ORTHANC_SANDBOXED) |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
48 # The source files below require access to the filesystem |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
49 list(APPEND ZLIB_SOURCES |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
50 ${ZLIB_SOURCES_DIR}/gzlib.c |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
51 ${ZLIB_SOURCES_DIR}/gzclose.c |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
52 ${ZLIB_SOURCES_DIR}/gzread.c |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
53 ${ZLIB_SOURCES_DIR}/gzwrite.c |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
54 ) |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
55 endif() |
c783f4f29390
log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
56 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1537
diff
changeset
|
57 source_group(ThirdParty\\zlib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*) |
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1537
diff
changeset
|
58 |
2364 | 59 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
60 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") | |
61 # "ioapi.c" from zlib (minizip) expects the "IOAPI_NO_64" macro to be set to "true" | |
62 # https://ohse.de/uwe/articles/lfs.html | |
63 add_definitions( | |
64 -DIOAPI_NO_64=1 | |
65 ) | |
66 endif() | |
67 | |
735 | 68 else() |
69 include(FindZLIB) | |
70 include_directories(${ZLIB_INCLUDE_DIRS}) | |
71 link_libraries(${ZLIB_LIBRARIES}) | |
72 endif() |