2025-01-22 19:57:19 +01:00
|
|
|
cmake_minimum_required(VERSION 3.12...3.31)
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
project(
|
|
|
|
zlib
|
2024-12-01 09:45:31 +01:00
|
|
|
LANGUAGES C
|
2025-01-03 09:50:16 +01:00
|
|
|
VERSION 1.4.1.1
|
2024-12-26 18:21:26 +01:00
|
|
|
HOMEPAGE_URL "https://zlib.net/"
|
|
|
|
DESCRIPTION "a general-purpose lossless data-compression library")
|
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2024-12-26 18:21:26 +01:00
|
|
|
# CPack
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2024-12-26 18:21:26 +01:00
|
|
|
set(CPACK_PACKAGE_VENDOR "zlib-Project")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE ${zlib_SOURCE_DIR}/README)
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${zlib_SOURCE_DIR}/LICENSE)
|
|
|
|
set(CPACK_RESOURCE_FILE_README ${zlib_SOURCE_DIR}/README)
|
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2024-12-26 18:21:26 +01:00
|
|
|
# configuration
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2012-03-11 10:19:06 +01:00
|
|
|
|
2024-12-01 17:48:11 +01:00
|
|
|
option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" ON)
|
2024-11-30 16:19:11 +01:00
|
|
|
option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON)
|
|
|
|
option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON)
|
2024-12-11 09:14:00 +01:00
|
|
|
option(ZLIB_BUILD_MINIZIP "Enable building libminizip contrib library" OFF)
|
2024-12-31 13:16:28 +01:00
|
|
|
option(ZLIB_INSTALL "Enable installation of zlib" ON)
|
2025-01-03 09:50:16 +01:00
|
|
|
option(ZLIB_PREFIX "prefix for all types and library functions, see zconf.h.in"
|
|
|
|
OFF)
|
2024-12-07 17:20:40 +01:00
|
|
|
mark_as_advanced(ZLIB_PREFIX)
|
2023-11-19 21:39:14 +01:00
|
|
|
|
2024-11-30 23:34:02 +01:00
|
|
|
if(WIN32)
|
|
|
|
option(ZLIB_INSTALL_COMPAT_DLL "Install a copy as zlib1.dll" ON)
|
|
|
|
endif(WIN32)
|
|
|
|
|
2024-12-03 13:44:06 +01:00
|
|
|
get_property(IS_MULTI GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
|
|
|
|
|
|
if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI)
|
|
|
|
message(STATUS "No CMAKE_BUILD_TYPE set -- using Release")
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI)
|
2024-12-30 10:56:16 +01:00
|
|
|
|
|
|
|
include(CheckCSourceCompiles)
|
2011-09-09 23:26:49 -07:00
|
|
|
include(CheckFunctionExists)
|
|
|
|
include(CheckIncludeFile)
|
2024-12-03 13:45:14 +01:00
|
|
|
include(CMakePackageConfigHelpers)
|
2024-12-30 10:56:16 +01:00
|
|
|
include(CheckTypeSize)
|
2024-12-26 18:21:26 +01:00
|
|
|
include(CPack)
|
2024-11-30 18:32:05 +01:00
|
|
|
include(GNUInstallDirs)
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2024-12-30 10:56:46 +01:00
|
|
|
set(CPACK_INCLUDED TRUE)
|
|
|
|
|
2024-12-07 17:23:40 +01:00
|
|
|
if(NOT ZLIB_CONF_WRITTEN)
|
|
|
|
set(Z_PREFIX ${ZLIB_PREFIX})
|
|
|
|
set(CONF_OUT_FILE ${zlib_BINARY_DIR}/zconf.h.cmakein)
|
2025-02-06 17:10:43 -08:00
|
|
|
file(READ ${zlib_SOURCE_DIR}/zconf.h ZCONF_CONTENT LIMIT 245)
|
2024-12-07 17:23:40 +01:00
|
|
|
file(WRITE ${CONF_OUT_FILE} ${ZCONF_CONTENT})
|
2024-12-07 17:26:12 +01:00
|
|
|
file(APPEND ${CONF_OUT_FILE} "#cmakedefine Z_PREFIX 1\n")
|
|
|
|
file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_STDARG_H 1\n")
|
|
|
|
file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_UNISTD_H 1\n")
|
2025-02-06 17:10:43 -08:00
|
|
|
file(READ ${zlib_SOURCE_DIR}/zconf.h ZCONF_CONTENT OFFSET 244)
|
2024-12-07 17:23:40 +01:00
|
|
|
set(FIRST_ITEM TRUE)
|
|
|
|
|
|
|
|
foreach(item IN LISTS ZCONF_CONTENT)
|
|
|
|
if(FIRST_ITEM)
|
|
|
|
string(APPEND OUT_CONTENT ${item})
|
|
|
|
set(FIRST_ITEM FALSE)
|
|
|
|
else(FIRST_ITEM)
|
|
|
|
string(APPEND OUT_CONTENT "\;" ${item})
|
|
|
|
endif(FIRST_ITEM)
|
|
|
|
endforeach(item IN LISTS ${ZCONF_CONTENT})
|
|
|
|
|
|
|
|
file(APPEND ${CONF_OUT_FILE} ${OUT_CONTENT})
|
2025-01-03 09:50:16 +01:00
|
|
|
set(ZLIB_CONF_WRITTEN
|
|
|
|
TRUE
|
|
|
|
CACHE BOOL "zconf.h.cmakein was created")
|
2024-12-07 17:23:40 +01:00
|
|
|
mark_as_advanced(ZLIB_CONF_WRITTEN)
|
|
|
|
endif(NOT ZLIB_CONF_WRITTEN)
|
2024-12-11 09:07:56 +01:00
|
|
|
|
2011-09-09 23:26:49 -07:00
|
|
|
#
|
|
|
|
# Check to see if we have large file support
|
|
|
|
#
|
2011-09-09 23:34:22 -07:00
|
|
|
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
2011-09-09 23:26:49 -07:00
|
|
|
check_type_size(off64_t OFF64_T)
|
2024-12-11 09:07:56 +01:00
|
|
|
unset(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
2011-09-09 23:26:49 -07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for fseeko
|
|
|
|
#
|
|
|
|
check_function_exists(fseeko HAVE_FSEEKO)
|
|
|
|
|
2024-12-07 17:23:40 +01:00
|
|
|
#
|
|
|
|
# Check for stdarg.h
|
|
|
|
#
|
|
|
|
check_include_file(stdarg.h HAVE_STDARG_H)
|
|
|
|
|
2011-09-09 23:26:49 -07:00
|
|
|
#
|
|
|
|
# Check for unistd.h
|
|
|
|
#
|
2024-12-07 17:23:40 +01:00
|
|
|
check_include_file(unistd.h HAVE_UNISTD_H)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check visibility attribute is supported
|
2024-12-11 09:08:47 +01:00
|
|
|
#
|
|
|
|
if(MSVC)
|
|
|
|
set(CMAKE_REQUIRED_FLAGS "-WX")
|
|
|
|
else(MSVC)
|
|
|
|
set(CMAKE_REQUIRED_FLAGS "-WError")
|
|
|
|
endif(MSVC)
|
|
|
|
|
2024-12-07 17:23:40 +01:00
|
|
|
check_c_source_compiles(
|
|
|
|
"
|
|
|
|
#include <stdlib.h>
|
|
|
|
static void f(void) __attribute__ ((visibility(\"hidden\")));
|
|
|
|
int main(void) {return 0;}
|
|
|
|
"
|
|
|
|
HAVE___ATTR__VIS_HIDDEN)
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2024-12-11 09:07:56 +01:00
|
|
|
unset(CMAKE_COMPILE_FLAGS)
|
2024-12-01 09:45:31 +01:00
|
|
|
set(ZLIB_PC ${zlib_BINARY_DIR}/zlib.pc)
|
2025-01-03 09:50:16 +01:00
|
|
|
configure_file(${zlib_SOURCE_DIR}/zlib.pc.cmakein ${ZLIB_PC} @ONLY)
|
|
|
|
configure_file(${zlib_BINARY_DIR}/zconf.h.cmakein ${zlib_BINARY_DIR}/zconf.h)
|
2011-09-09 23:27:26 -07:00
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2011-09-09 23:26:49 -07:00
|
|
|
# zlib
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
set(ZLIB_PUBLIC_HDRS ${zlib_BINARY_DIR}/zconf.h zlib.h)
|
2024-12-01 17:05:50 +01:00
|
|
|
|
2011-09-09 23:26:49 -07:00
|
|
|
set(ZLIB_PRIVATE_HDRS
|
|
|
|
crc32.h
|
|
|
|
deflate.h
|
|
|
|
gzguts.h
|
|
|
|
inffast.h
|
|
|
|
inffixed.h
|
|
|
|
inflate.h
|
|
|
|
inftrees.h
|
|
|
|
trees.h
|
2024-12-01 17:05:50 +01:00
|
|
|
zutil.h)
|
|
|
|
|
2011-09-09 23:26:49 -07:00
|
|
|
set(ZLIB_SRCS
|
|
|
|
adler32.c
|
|
|
|
compress.c
|
|
|
|
crc32.c
|
|
|
|
deflate.c
|
|
|
|
gzclose.c
|
|
|
|
gzlib.c
|
|
|
|
gzread.c
|
|
|
|
gzwrite.c
|
|
|
|
inflate.c
|
|
|
|
infback.c
|
|
|
|
inftrees.c
|
|
|
|
inffast.c
|
|
|
|
trees.c
|
|
|
|
uncompr.c
|
2024-12-01 17:05:50 +01:00
|
|
|
zutil.c)
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2024-11-30 23:34:02 +01:00
|
|
|
if(WIN32)
|
2024-12-02 15:07:40 +01:00
|
|
|
set(zlib_static_suffix "s")
|
|
|
|
set(CMAKE_DEBUG_POSTFIX "d")
|
2024-11-30 23:34:02 +01:00
|
|
|
endif(WIN32)
|
|
|
|
|
2024-11-30 16:19:11 +01:00
|
|
|
if(ZLIB_BUILD_SHARED)
|
2025-01-03 09:50:16 +01:00
|
|
|
add_library(
|
|
|
|
zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}
|
|
|
|
$<$<OR:$<BOOL:${WIN32}>,$<BOOL:${CYGWIN}>>:win32/zlib1.rc>)
|
2024-12-02 15:11:31 +01:00
|
|
|
add_library(ZLIB::ZLIB ALIAS zlib)
|
2025-01-03 09:50:16 +01:00
|
|
|
target_include_directories(
|
|
|
|
zlib
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${zlib_BINARY_DIR}>
|
|
|
|
$<BUILD_INTERFACE:${zlib_SOURCE_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
|
|
|
target_compile_definitions(
|
|
|
|
zlib
|
2025-02-18 08:47:58 +01:00
|
|
|
PRIVATE ZLIB_BUILD
|
|
|
|
$<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
|
2025-01-03 09:50:16 +01:00
|
|
|
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>
|
|
|
|
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
|
|
|
|
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
|
|
|
|
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
|
2024-12-11 09:09:45 +01:00
|
|
|
set(INSTALL_VERSION ${zlib_VERSION})
|
2024-12-05 12:31:33 +01:00
|
|
|
|
|
|
|
if(NOT CYGWIN)
|
2025-01-03 09:50:16 +01:00
|
|
|
set_target_properties(zlib PROPERTIES SOVERSION ${zlib_VERSION_MAJOR}
|
|
|
|
VERSION ${INSTALL_VERSION})
|
2024-12-05 12:31:33 +01:00
|
|
|
endif(NOT CYGWIN)
|
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
set_target_properties(
|
|
|
|
zlib
|
|
|
|
PROPERTIES DEFINE_SYMBOL ZLIB_DLL
|
|
|
|
EXPORT_NAME ZLIB
|
|
|
|
OUTPUT_NAME z)
|
|
|
|
if(UNIX
|
|
|
|
AND NOT APPLE
|
|
|
|
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX))
|
2024-12-01 08:53:27 +01:00
|
|
|
# On unix-like platforms the library is almost always called libz
|
2025-01-03 09:50:16 +01:00
|
|
|
set_target_properties(
|
|
|
|
zlib
|
|
|
|
PROPERTIES LINK_FLAGS
|
|
|
|
"-Wl,--version-script,\"${zlib_SOURCE_DIR}/zlib.map\"")
|
|
|
|
endif(
|
|
|
|
UNIX
|
|
|
|
AND NOT APPLE
|
|
|
|
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX))
|
2024-11-30 16:19:11 +01:00
|
|
|
endif(ZLIB_BUILD_SHARED)
|
|
|
|
|
|
|
|
if(ZLIB_BUILD_STATIC)
|
2025-01-03 09:50:16 +01:00
|
|
|
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS}
|
|
|
|
${ZLIB_PRIVATE_HDRS})
|
2024-12-02 15:11:31 +01:00
|
|
|
add_library(ZLIB::ZLIBSTATIC ALIAS zlibstatic)
|
2025-01-03 09:50:16 +01:00
|
|
|
target_include_directories(
|
|
|
|
zlibstatic
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${zlib_BINARY_DIR}>
|
|
|
|
$<BUILD_INTERFACE:${zlib_SOURCE_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
|
|
|
target_compile_definitions(
|
|
|
|
zlibstatic
|
2025-02-18 08:47:58 +01:00
|
|
|
PRIVATE ZLIB_BUILD
|
|
|
|
$<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
|
2025-01-03 09:50:16 +01:00
|
|
|
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>
|
|
|
|
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
|
|
|
|
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
|
|
|
|
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
|
|
|
|
set_target_properties(
|
|
|
|
zlibstatic PROPERTIES EXPORT_NAME ZLIBSTATIC OUTPUT_NAME
|
|
|
|
z${zlib_static_suffix})
|
2024-11-30 16:19:11 +01:00
|
|
|
endif(ZLIB_BUILD_STATIC)
|
|
|
|
|
2024-12-31 13:16:28 +01:00
|
|
|
if(ZLIB_INSTALL)
|
2024-11-30 16:19:11 +01:00
|
|
|
if(ZLIB_BUILD_SHARED)
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
TARGETS zlib
|
2024-12-01 17:37:47 +01:00
|
|
|
COMPONENT Runtime
|
2024-12-31 12:55:38 +01:00
|
|
|
EXPORT zlibSharedExport
|
2024-11-30 18:32:05 +01:00
|
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
2024-11-30 23:34:02 +01:00
|
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
EXPORT zlibSharedExport
|
|
|
|
FILE ZLIB-shared.cmake
|
|
|
|
NAMESPACE ZLIB::
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
|
2024-11-30 23:34:02 +01:00
|
|
|
if(ZLIB_INSTALL_COMPAT_DLL)
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
FILES $<TARGET_FILE:zlib>
|
2024-12-01 17:37:47 +01:00
|
|
|
COMPONENT Runtime
|
2024-11-30 23:34:02 +01:00
|
|
|
RENAME zlib1.dll
|
|
|
|
DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
|
|
endif(ZLIB_INSTALL_COMPAT_DLL)
|
2024-11-30 23:42:03 +01:00
|
|
|
|
|
|
|
if(MSVC)
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
FILES $<TARGET_PDB_FILE:zlib>
|
2024-12-01 17:37:47 +01:00
|
|
|
COMPONENT Runtime
|
2024-11-30 23:42:03 +01:00
|
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
CONFIGURATIONS Debug OR RelWithDebInfo
|
2025-01-03 09:50:16 +01:00
|
|
|
OPTIONAL)
|
2024-11-30 23:42:03 +01:00
|
|
|
endif(MSVC)
|
2024-11-30 16:19:11 +01:00
|
|
|
endif(ZLIB_BUILD_SHARED)
|
|
|
|
|
|
|
|
if(ZLIB_BUILD_STATIC)
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
TARGETS zlibstatic
|
2024-12-01 17:37:47 +01:00
|
|
|
COMPONENT Development
|
2024-12-31 12:55:38 +01:00
|
|
|
EXPORT zlibStaticExport
|
2024-11-30 18:32:05 +01:00
|
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
2024-11-30 23:34:02 +01:00
|
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
EXPORT zlibStaticExport
|
2024-12-31 12:55:38 +01:00
|
|
|
FILE ZLIB-static.cmake
|
|
|
|
NAMESPACE ZLIB::
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
|
|
|
|
|
2024-12-05 13:15:49 +01:00
|
|
|
if(ZLIB_INSTALL_COMPAT_DLL AND MINGW)
|
2025-01-03 09:50:16 +01:00
|
|
|
install(
|
|
|
|
FILES $<TARGET_FILE:zlibstatic>
|
2024-12-05 13:15:49 +01:00
|
|
|
COMPONENT Development
|
|
|
|
RENAME libz.dll.a
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
2024-12-05 13:17:14 +01:00
|
|
|
endif(ZLIB_INSTALL_COMPAT_DLL AND MINGW)
|
2024-11-30 16:19:11 +01:00
|
|
|
endif(ZLIB_BUILD_STATIC)
|
2024-12-01 17:37:47 +01:00
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
configure_package_config_file(
|
|
|
|
${zlib_SOURCE_DIR}/zlibConfig.cmake.in
|
2024-12-15 20:07:20 +01:00
|
|
|
${zlib_BINARY_DIR}/ZLIBConfig.cmake
|
2024-12-31 12:55:38 +01:00
|
|
|
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
|
2024-12-03 13:45:14 +01:00
|
|
|
|
|
|
|
write_basic_package_version_file(
|
2024-12-15 20:07:20 +01:00
|
|
|
"${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake"
|
2024-12-03 13:45:14 +01:00
|
|
|
VERSION "${zlib_VERSION}"
|
|
|
|
COMPATIBILITY AnyNewerVersion)
|
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
install(FILES ${zlib_BINARY_DIR}/ZLIBConfig.cmake
|
|
|
|
${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
|
|
|
|
install(
|
|
|
|
FILES ${ZLIB_PUBLIC_HDRS}
|
|
|
|
COMPONENT Development
|
|
|
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
|
|
install(
|
|
|
|
FILES zlib.3
|
|
|
|
COMPONENT Docs
|
|
|
|
DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
|
|
|
|
install(
|
|
|
|
FILES LICENSE
|
|
|
|
doc/algorithm.txt
|
|
|
|
doc/crc-doc.1.0.pdf
|
|
|
|
doc/rfc1950.txt
|
|
|
|
doc/rfc1951.txt
|
|
|
|
doc/rfc1952.txt
|
|
|
|
doc/txtvsbin.txt
|
|
|
|
COMPONENT Docs
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}/zlib")
|
|
|
|
install(
|
|
|
|
FILES ${ZLIB_PC}
|
|
|
|
COMPONENT Development
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
2024-12-31 13:16:28 +01:00
|
|
|
endif(ZLIB_INSTALL)
|
2011-09-09 23:26:49 -07:00
|
|
|
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2024-12-11 09:10:44 +01:00
|
|
|
# Tests
|
2025-01-03 09:50:16 +01:00
|
|
|
# ============================================================================
|
2024-12-01 17:48:11 +01:00
|
|
|
if(ZLIB_BUILD_TESTING)
|
|
|
|
enable_testing()
|
2024-12-03 15:23:19 +01:00
|
|
|
add_subdirectory(test)
|
2024-12-01 17:48:11 +01:00
|
|
|
endif(ZLIB_BUILD_TESTING)
|
2024-12-11 09:14:00 +01:00
|
|
|
|
|
|
|
if(ZLIB_BUILD_MINIZIP)
|
|
|
|
add_subdirectory(contrib/minizip/)
|
|
|
|
endif(ZLIB_BUILD_MINIZIP)
|