|
1
|
function(zlib_add_contrib_lib name description dir) |
|
2
|
option(ZLIB_BUILD_${name} "Enable building of ${description}" OFF) |
|
3
|
|
|
4
|
if(ZLIB_BUILD_${name}) |
|
5
|
if(NOT DEFINED ZLIB_${name}_BUILD_SHARED) |
|
6
|
set(ZLIB_${name}_BUILD_SHARED ${ZLIB_BUILD_SHARED} CACHE BOOL "") |
|
7
|
endif(NOT DEFINED ZLIB_${name}_BUILD_SHARED) |
|
8
|
|
|
9
|
if(NOT DEFINED ZLIB_${name}_BUILD_STATIC) |
|
10
|
set(ZLIB_${name}_BUILD_STATIC ${ZLIB_BUILD_STATIC} CACHE BOOL "") |
|
11
|
endif(NOT DEFINED ZLIB_${name}_BUILD_STATIC) |
|
12
|
|
|
13
|
if(NOT DEFINED ZLIB_${name}_BUILD_TESTING) |
|
14
|
set(ZLIB_${name}_BUILD_TESTING ${ZLIB_BUILD_TESTING} CACHE BOOL "") |
|
15
|
endif(NOT DEFINED ZLIB_${name}_BUILD_TESTING) |
|
16
|
|
|
17
|
if(NOT DEFINED ZLIB_${name}_INSTALL) |
|
18
|
set(ZLIB_${name}_INSTALL ${ZLIB_INSTALL} CACHE BOOL "") |
|
19
|
endif(NOT DEFINED ZLIB_${name}_INSTALL) |
|
20
|
|
|
21
|
add_subdirectory(${dir}/) |
|
22
|
endif(ZLIB_BUILD_${name}) |
|
23
|
endfunction(zlib_add_contrib_lib name description dir) |
|
24
|
|
|
25
|
function(zlib_add_contrib_feature name description dir) |
|
26
|
if(ARGC EQUAL 4) |
|
27
|
set(default_on ${ARGV3}) |
|
28
|
else() |
|
29
|
set(default_on Off) |
|
30
|
endif() |
|
31
|
|
|
32
|
option(ZLIB_WITH_${name} |
|
33
|
"Enable build ${description}" |
|
34
|
${default_on}) |
|
35
|
|
|
36
|
if(ZLIB_WITH_${name}) |
|
37
|
add_subdirectory(${dir}/) |
|
38
|
endif(ZLIB_WITH_${name}) |
|
39
|
endfunction(zlib_add_contrib_feature name description dir) |
|
40
|
|
|
41
|
zlib_add_contrib_feature("GVMAT64" |
|
42
|
"of an optimized longest_match for 32 bits x86_64" |
|
43
|
gcc_gvmat64) |
|
44
|
|
|
45
|
zlib_add_contrib_feature(INFBACK9 "with support for method 9 deflate" infback9) |
|
46
|
zlib_add_contrib_feature(CRC32VX "with S390X-CRC32VX implementation" crc32vx) |
|
47
|
zlib_add_contrib_lib(ADA "Ada bindings" ada) |
|
48
|
zlib_add_contrib_lib(BLAST "blast binary" blast) |
|
49
|
zlib_add_contrib_lib(IOSTREAM3 "IOStream C++ bindings V3" iostream3) |
|
50
|
zlib_add_contrib_lib(MINIZIP "minizip library" minizip) |
|
51
|
zlib_add_contrib_lib(PUFF "puff decompress library" puff) |
|
52
|
|
|
53
|
if(WIN32) |
|
54
|
zlib_add_contrib_lib(TESTZLIB "testzlib binary" testzlib) |
|
55
|
|
|
56
|
if (ZLIB_BUILD_ZLIB1_DLL) |
|
57
|
add_subdirectory(zlib1-dll/) |
|
58
|
endif (ZLIB_BUILD_ZLIB1_DLL) |
|
59
|
|
|
60
|
option(ZLIB_BUILD_ZLIB1_DLL "Build the legacy zlib + minizip DLL" OFF) |
|
61
|
endif(WIN32) |
|
62
|
|