1
|
1 if (STATIC_BUILD OR NOT USE_SYSTEM_ZLIB)
|
|
2 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7)
|
|
3 SET(ZLIB_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/zlib-1.2.7.tar.gz")
|
|
4 SET(ZLIB_MD5 "60df6a37c56e7c1366cca812414f7b85")
|
|
5
|
|
6 DownloadPackage(${ZLIB_MD5} ${ZLIB_URL} "${ZLIB_SOURCES_DIR}")
|
|
7
|
|
8 include_directories(
|
|
9 ${ZLIB_SOURCES_DIR}
|
|
10 )
|
|
11
|
|
12 list(APPEND ZLIB_SOURCES
|
|
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
|
|
30 else()
|
|
31 include(FindZLIB)
|
|
32 include_directories(${ZLIB_INCLUDE_DIRS})
|
|
33 link_libraries(${ZLIB_LIBRARIES})
|
|
34 endif()
|
|
35
|
|
36 source_group(ThirdParty\\ZLib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*)
|