diff --git a/CMakeLists.txt b/CMakeLists.txt index 20eaa9e1..74bc1a93 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()