blob: c42a434858571440ef56a3a706c6d713ed46a30b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
PROJECT(CMZLIB)
INCLUDE_DIRECTORIES(
"${CMZLIB_SOURCE_DIR}"
"${CMZLIB_SOURCE_DIR}/.."
"${CMZLIB_BINARY_DIR}/.."
)
# source files for zlib
SET(ZLIB_SRCS
adler32.c compress.c crc32.c deflate.c gzio.c inffast.c
inflate.c inftrees.c trees.c uncompr.c zutil.c
)
# for windows add the .def and .rc files to the source list
# if building shared libs
IF(WIN32)
IF(BUILD_SHARED_LIBS)
SET(ZLIB_DLL 1)
IF(NOT UNIX)
IF(NOT BORLAND)
IF(NOT MINGW)
SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc )
ENDIF(NOT MINGW)
ENDIF(NOT BORLAND)
ENDIF(NOT UNIX)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(WIN32)
CONFIGURE_FILE(${CMZLIB_SOURCE_DIR}/.NoDartCoverage
${CMZLIB_BINARY_DIR}/.NoDartCoverage)
CONFIGURE_FILE(${CMZLIB_SOURCE_DIR}/zlibDllConfig.h.in
${CMZLIB_BINARY_DIR}/zlibDllConfig.h)
FOREACH(name zlib zconf cm_zlib_mangle)
CONFIGURE_FILE(${CMZLIB_SOURCE_DIR}/${name}.h
${CMZLIB_BINARY_DIR}/${name}.h COPYONLY)
ENDFOREACH(name)
ADD_LIBRARY(cmzlib ${ZLIB_SRCS})
INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}/cmzlib)
|