CMake: Use the same definition we checked for off64_t.

Move to target_compile_definitions.
pull/953/merge
Vollstrecker 2 months ago committed by Mark Adler
parent 31d2462c1d
commit 899ef97c4a
  1. 4
      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()

Loading…
Cancel
Save