diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2024-12-01 16:55:19 +0100 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2025-01-31 19:59:10 -0800 |
| commit | 899ef97c4a2ca0d9e27d3d91437f6da5e6eea218 (patch) | |
| tree | 6ff2e6a60db555d886867b398d031cfc656244d2 | |
| parent | 31d2462c1df539e6bb9bedc987ba991672a1906e (diff) | |
| download | zlib-899ef97c4a2ca0d9e27d3d91437f6da5e6eea218.tar.gz zlib-899ef97c4a2ca0d9e27d3d91437f6da5e6eea218.tar.bz2 zlib-899ef97c4a2ca0d9e27d3d91437f6da5e6eea218.zip | |
CMake: Use the same definition we checked for off64_t.
Move to target_compile_definitions.
| -rw-r--r-- | CMakeLists.txt | 4 |
1 files 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) | |||
| 216 | 216 | ||
| 217 | if(HAVE_OFF64_T) | 217 | if(HAVE_OFF64_T) |
| 218 | add_executable(zlib_example64 test/example.c) | 218 | add_executable(zlib_example64 test/example.c) |
| 219 | target_compile_definitions(zlib_example64 PRIVATE LARGEFILE64_SOURCE=1) | ||
| 219 | target_link_libraries(zlib_example64 zlib) | 220 | target_link_libraries(zlib_example64 zlib) |
| 220 | set_target_properties(zlib_example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") | ||
| 221 | add_test(zlib_example64 zlib_example64) | 221 | add_test(zlib_example64 zlib_example64) |
| 222 | 222 | ||
| 223 | add_executable(minigzip64 test/minigzip.c) | 223 | add_executable(minigzip64 test/minigzip.c) |
| 224 | target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) | ||
| 224 | target_link_libraries(minigzip64 zlib) | 225 | target_link_libraries(minigzip64 zlib) |
| 225 | set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") | ||
| 226 | endif() | 226 | endif() |
| 227 | endif() | 227 | endif() |
