Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/ZlibConfiguration.cmake @ 4436:80a437bcc09b
pre-release of Orthanc framework 23ad1b9c7800
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 06 Jan 2021 09:39:07 +0100 |
parents | 304842a0d152 |
children | d9473bd5ed43 |
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 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium |
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 | 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 | 27 |
28 include_directories( | |
29 ${ZLIB_SOURCES_DIR} | |
30 ) | |
31 | |
1414 | 32 list(APPEND ZLIB_SOURCES |
735 | 33 ${ZLIB_SOURCES_DIR}/adler32.c |
34 ${ZLIB_SOURCES_DIR}/compress.c | |
35 ${ZLIB_SOURCES_DIR}/crc32.c | |
36 ${ZLIB_SOURCES_DIR}/deflate.c | |
37 ${ZLIB_SOURCES_DIR}/infback.c | |
38 ${ZLIB_SOURCES_DIR}/inffast.c | |
39 ${ZLIB_SOURCES_DIR}/inflate.c | |
40 ${ZLIB_SOURCES_DIR}/inftrees.c | |
41 ${ZLIB_SOURCES_DIR}/trees.c | |
42 ${ZLIB_SOURCES_DIR}/uncompr.c | |
43 ${ZLIB_SOURCES_DIR}/zutil.c | |
44 ) | |
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 | 58 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
59 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") | |
60 # "ioapi.c" from zlib (minizip) expects the "IOAPI_NO_64" macro to be set to "true" | |
61 # https://ohse.de/uwe/articles/lfs.html | |
62 add_definitions( | |
63 -DIOAPI_NO_64=1 | |
64 ) | |
65 endif() | |
66 | |
735 | 67 else() |
68 include(FindZLIB) | |
69 include_directories(${ZLIB_INCLUDE_DIRS}) | |
70 link_libraries(${ZLIB_LIBRARIES}) | |
71 endif() |