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