0
|
1 if (${STATIC_BUILD})
|
|
2 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7)
|
|
3 DownloadPackage("http://zlib.net/zlib-1.2.7.tar.gz" "${ZLIB_SOURCES_DIR}" "${ZLIB_PRELOADED}" "")
|
|
4
|
|
5 include_directories(
|
|
6 ${ZLIB_SOURCES_DIR}
|
|
7 )
|
|
8
|
|
9 list(APPEND THIRD_PARTY_SOURCES
|
|
10 ${ZLIB_SOURCES_DIR}/adler32.c
|
|
11 ${ZLIB_SOURCES_DIR}/compress.c
|
|
12 ${ZLIB_SOURCES_DIR}/crc32.c
|
|
13 ${ZLIB_SOURCES_DIR}/deflate.c
|
|
14 ${ZLIB_SOURCES_DIR}/gzclose.c
|
|
15 ${ZLIB_SOURCES_DIR}/gzlib.c
|
|
16 ${ZLIB_SOURCES_DIR}/gzread.c
|
|
17 ${ZLIB_SOURCES_DIR}/gzwrite.c
|
|
18 ${ZLIB_SOURCES_DIR}/infback.c
|
|
19 ${ZLIB_SOURCES_DIR}/inffast.c
|
|
20 ${ZLIB_SOURCES_DIR}/inflate.c
|
|
21 ${ZLIB_SOURCES_DIR}/inftrees.c
|
|
22 ${ZLIB_SOURCES_DIR}/trees.c
|
|
23 ${ZLIB_SOURCES_DIR}/uncompr.c
|
|
24 ${ZLIB_SOURCES_DIR}/zutil.c
|
|
25 )
|
|
26
|
|
27 else()
|
|
28 include(FindZLIB)
|
|
29 include_directories(${ZLIB_INCLUDE_DIRS})
|
|
30 link_libraries(${ZLIB_LIBRARIES})
|
|
31 endif()
|