From 899ef97c4a2ca0d9e27d3d91437f6da5e6eea218 Mon Sep 17 00:00:00 2001 From: Vollstrecker Date: Sun, 1 Dec 2024 16:55:19 +0100 Subject: CMake: Use the same definition we checked for off64_t. Move to target_compile_definitions. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20eaa9e..74bc1a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,12 +216,12 @@ if(ZLIB_BUILD_EXAMPLES) if(HAVE_OFF64_T) add_executable(zlib_example64 test/example.c) + target_compile_definitions(zlib_example64 PRIVATE LARGEFILE64_SOURCE=1) target_link_libraries(zlib_example64 zlib) - set_target_properties(zlib_example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") add_test(zlib_example64 zlib_example64) add_executable(minigzip64 test/minigzip.c) + target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) target_link_libraries(minigzip64 zlib) - set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") endif() endif() -- cgit v1.2.3-55-g6feb