annotate OrthancFramework/Resources/CMake/ZlibConfiguration.cmake @ 4658:66f6fd77deaf Orthanc-1.9.3

Orthanc-1.9.3
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 May 2021 09:22:38 +0200
parents d9473bd5ed43
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 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
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
5 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
6 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
7 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
9 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
10 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
11 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
14 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
15 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
16 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
17 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
18 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
20
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
21 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
22 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.11)
3133
0c2a8d5e0097 moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2509
diff changeset
23 SET(ZLIB_URL "http://orthanc.osimis.io/ThirdPartyDownloads/zlib-1.2.11.tar.gz")
2509
9d9f2d088dce upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
24 SET(ZLIB_MD5 "1c9f62f0778697a09d36121ead88e08e")
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1493
diff changeset
25
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1493
diff changeset
26 DownloadPackage(${ZLIB_MD5} ${ZLIB_URL} "${ZLIB_SOURCES_DIR}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
27
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
28 include_directories(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
29 ${ZLIB_SOURCES_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
30 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
31
1414
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
32 list(APPEND ZLIB_SOURCES
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
33 ${ZLIB_SOURCES_DIR}/adler32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
34 ${ZLIB_SOURCES_DIR}/compress.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
35 ${ZLIB_SOURCES_DIR}/crc32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
36 ${ZLIB_SOURCES_DIR}/deflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
37 ${ZLIB_SOURCES_DIR}/infback.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
38 ${ZLIB_SOURCES_DIR}/inffast.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
39 ${ZLIB_SOURCES_DIR}/inflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
40 ${ZLIB_SOURCES_DIR}/inftrees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
41 ${ZLIB_SOURCES_DIR}/trees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
42 ${ZLIB_SOURCES_DIR}/uncompr.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
43 ${ZLIB_SOURCES_DIR}/zutil.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
44 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
45
4017
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
46 if (NOT ORTHANC_SANDBOXED)
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
47 # The source files below require access to the filesystem
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
48 list(APPEND ZLIB_SOURCES
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
49 ${ZLIB_SOURCES_DIR}/gzlib.c
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
50 ${ZLIB_SOURCES_DIR}/gzclose.c
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
51 ${ZLIB_SOURCES_DIR}/gzread.c
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
52 ${ZLIB_SOURCES_DIR}/gzwrite.c
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
53 )
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
54 endif()
c783f4f29390 log using emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
55
2113
0108ac01fc8e added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
56 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
57
2364
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
58 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
59 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
60 # "ioapi.c" from zlib (minizip) expects the "IOAPI_NO_64" macro to be set to "true"
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
61 # https://ohse.de/uwe/articles/lfs.html
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
62 add_definitions(
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
63 -DIOAPI_NO_64=1
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
64 )
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
65 endif()
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
66
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
67 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
68 include(FindZLIB)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
69 include_directories(${ZLIB_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
70 link_libraries(${ZLIB_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
71 endif()