From 5a82f71ed1dfc0bec044d9702463dbdf84ea3b71 Mon Sep 17 00:00:00 2001 From: Vollstrecker Date: Tue, 18 Feb 2025 08:47:58 +0100 Subject: Use generated zconf.h in cmake build. This restores the inclusion of the local zconf.h (double quoted) in normal usage. --- test/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 46c07eb..0d2844d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,6 +16,7 @@ endfunction() if(ZLIB_BUILD_SHARED) add_executable(zlib_example example.c) target_link_libraries(zlib_example ZLIB::ZLIB) + target_compile_definitions(zlib_example PRIVATE ZLIB_BUILD) add_test(NAME zlib_example COMMAND zlib_example) add_executable(minigzip minigzip.c) @@ -38,7 +39,7 @@ if(ZLIB_BUILD_SHARED) add_executable(zlib_example64 example.c) target_compile_definitions( zlib_example64 - PRIVATE LARGEFILE64_SOURCE=1 + PRIVATE ZLIB_BUILD $<$:HAVE_HIDDEN>) target_link_libraries(zlib_example64 ZLIB::ZLIB) add_test(NAME zlib_example64 COMMAND zlib_example64) @@ -61,7 +62,8 @@ if(ZLIB_BUILD_STATIC) target_link_libraries(zlib_static_example ZLIB::ZLIBSTATIC) target_compile_definitions( zlib_static_example - PRIVATE $<$:HAVE_HIDDEN>) + PRIVATE ZLIB_BUILD + $<$:HAVE_HIDDEN>) add_test(NAME zlib_static_example COMMAND zlib_static_example) add_executable(static_minigzip minigzip.c) @@ -116,7 +118,7 @@ if(ZLIB_BUILD_STATIC) add_executable(zlib_static_example64 example.c) target_compile_definitions( zlib_static_example64 - PRIVATE LARGEFILE64_SOURCE=1 + PRIVATE ZLIB_BUILD $<$:HAVE_HIDDEN>) target_link_libraries(zlib_static_example64 ZLIB::ZLIBSTATIC) add_test(NAME zlib_static_example64 COMMAND zlib_static_example64) -- cgit v1.2.3-55-g6feb