Mercurial > hg > orthanc
annotate Resources/CMake/ZlibConfiguration.cmake @ 2809:b509d9a4958b
news
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Sep 2018 17:59:09 +0200 |
parents | 9d9f2d088dce |
children | 0c2a8d5e0097 |
rev | line source |
---|---|
735 | 1 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
|
2 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.11) |
9d9f2d088dce
upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
3 SET(ZLIB_URL "http://www.orthanc-server.com/downloads/third-party/zlib-1.2.11.tar.gz") |
9d9f2d088dce
upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
4 SET(ZLIB_MD5 "1c9f62f0778697a09d36121ead88e08e") |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
5 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
6 DownloadPackage(${ZLIB_MD5} ${ZLIB_URL} "${ZLIB_SOURCES_DIR}") |
735 | 7 |
8 include_directories( | |
9 ${ZLIB_SOURCES_DIR} | |
10 ) | |
11 | |
1414 | 12 list(APPEND ZLIB_SOURCES |
735 | 13 ${ZLIB_SOURCES_DIR}/adler32.c |
14 ${ZLIB_SOURCES_DIR}/compress.c | |
15 ${ZLIB_SOURCES_DIR}/crc32.c | |
16 ${ZLIB_SOURCES_DIR}/deflate.c | |
17 ${ZLIB_SOURCES_DIR}/gzclose.c | |
18 ${ZLIB_SOURCES_DIR}/gzlib.c | |
19 ${ZLIB_SOURCES_DIR}/gzread.c | |
20 ${ZLIB_SOURCES_DIR}/gzwrite.c | |
21 ${ZLIB_SOURCES_DIR}/infback.c | |
22 ${ZLIB_SOURCES_DIR}/inffast.c | |
23 ${ZLIB_SOURCES_DIR}/inflate.c | |
24 ${ZLIB_SOURCES_DIR}/inftrees.c | |
25 ${ZLIB_SOURCES_DIR}/trees.c | |
26 ${ZLIB_SOURCES_DIR}/uncompr.c | |
27 ${ZLIB_SOURCES_DIR}/zutil.c | |
28 ) | |
29 | |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1537
diff
changeset
|
30 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
|
31 |
2364 | 32 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
33 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") | |
34 # "ioapi.c" from zlib (minizip) expects the "IOAPI_NO_64" macro to be set to "true" | |
35 # https://ohse.de/uwe/articles/lfs.html | |
36 add_definitions( | |
37 -DIOAPI_NO_64=1 | |
38 ) | |
39 endif() | |
40 | |
735 | 41 else() |
42 include(FindZLIB) | |
43 include_directories(${ZLIB_INCLUDE_DIRS}) | |
44 link_libraries(${ZLIB_LIBRARIES}) | |
45 endif() |