-
Notifications
You must be signed in to change notification settings - Fork 53
/
CMakeLists.txt
44 lines (37 loc) · 1.21 KB
/
CMakeLists.txt
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
44
# Begin copied (and slightly modified) from zlib-ng
check_include_file(unistd.h Z_HAVE_UNISTD_H)
function(generate_cmakein input output)
file(READ "${input}" input_data)
string(REPLACE "#define ZCONF_H" "#define ZCONF_H\n#cmakedefine Z_HAVE_UNISTD_H" output_data "${input_data}")
file(WRITE "${output}" "${output_data}")
endfunction(generate_cmakein)
generate_cmakein("${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng/zconf.h.in" "${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein")
configure_file( ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
## End copied from zlib-ng
include (SquashPlugin)
squash_plugin(
NAME zlib-ng
SOURCES squash-zlib-ng.c
EMBED_SOURCES
zlib-ng/adler32.c
zlib-ng/compress.c
zlib-ng/crc32.c
zlib-ng/deflate.c
zlib-ng/deflate_fast.c
zlib-ng/deflate_medium.c
zlib-ng/deflate_slow.c
zlib-ng/infback.c
zlib-ng/inffast.c
zlib-ng/inflate.c
zlib-ng/inftrees.c
zlib-ng/match.c
zlib-ng/trees.c
zlib-ng/uncompr.c
zlib-ng/zutil.c
INCLUDE_DIRS
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng
EMBED_COMPILER_FLAGS
-Wno-shift-negative-value)
list (APPEND zlibng_sources ${libzlibng_sources})