annotate OrthancFramework/Resources/CMake/ZlibConfiguration.cmake @ 5081:c673997507ea attach-custom-data

advanced storage cont
author Alain Mazy <am@osimis.io>
date Tue, 13 Sep 2022 11:02:43 +0200
parents 43e613a7756b
children 0ea402b4d901
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
4870
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
5 # Copyright (C) 2021-2022 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
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
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)
3133
0c2a8d5e0097 moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2509
diff changeset
24 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
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
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
28
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
29 include_directories(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
30 ${ZLIB_SOURCES_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
31 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
32
1414
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
33 list(APPEND ZLIB_SOURCES
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
34 ${ZLIB_SOURCES_DIR}/adler32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
35 ${ZLIB_SOURCES_DIR}/compress.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
36 ${ZLIB_SOURCES_DIR}/crc32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
37 ${ZLIB_SOURCES_DIR}/deflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
38 ${ZLIB_SOURCES_DIR}/infback.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
39 ${ZLIB_SOURCES_DIR}/inffast.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
40 ${ZLIB_SOURCES_DIR}/inflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
41 ${ZLIB_SOURCES_DIR}/inftrees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
42 ${ZLIB_SOURCES_DIR}/trees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
43 ${ZLIB_SOURCES_DIR}/uncompr.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
44 ${ZLIB_SOURCES_DIR}/zutil.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
45 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
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
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
59 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
60 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
61 # "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
62 # https://ohse.de/uwe/articles/lfs.html
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
63 add_definitions(
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
64 -DIOAPI_NO_64=1
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
65 )
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
66 endif()
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
67
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
68 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
69 include(FindZLIB)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
70 include_directories(${ZLIB_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
71 link_libraries(${ZLIB_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
72 endif()