annotate Resources/CMake/ZlibConfiguration.cmake @ 2974:5f64ecbdfcb4

merge
author am@osimis.io
date Thu, 06 Dec 2018 10:39:27 +0100
parents 9d9f2d088dce
children 0c2a8d5e0097
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
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
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
7
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
8 include_directories(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
9 ${ZLIB_SOURCES_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
10 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
11
1414
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
12 list(APPEND ZLIB_SOURCES
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
13 ${ZLIB_SOURCES_DIR}/adler32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
14 ${ZLIB_SOURCES_DIR}/compress.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
15 ${ZLIB_SOURCES_DIR}/crc32.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
16 ${ZLIB_SOURCES_DIR}/deflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
17 ${ZLIB_SOURCES_DIR}/gzclose.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
18 ${ZLIB_SOURCES_DIR}/gzlib.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
19 ${ZLIB_SOURCES_DIR}/gzread.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
20 ${ZLIB_SOURCES_DIR}/gzwrite.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
21 ${ZLIB_SOURCES_DIR}/infback.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
22 ${ZLIB_SOURCES_DIR}/inffast.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
23 ${ZLIB_SOURCES_DIR}/inflate.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
24 ${ZLIB_SOURCES_DIR}/inftrees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
25 ${ZLIB_SOURCES_DIR}/trees.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
26 ${ZLIB_SOURCES_DIR}/uncompr.c
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
27 ${ZLIB_SOURCES_DIR}/zutil.c
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
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
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
32 if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
33 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
34 # "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
35 # https://ohse.de/uwe/articles/lfs.html
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
36 add_definitions(
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
37 -DIOAPI_NO_64=1
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
38 )
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
39 endif()
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
40
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
41 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
42 include(FindZLIB)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
43 include_directories(${ZLIB_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
44 link_libraries(${ZLIB_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 672
diff changeset
45 endif()