|
|
|
@ -231,23 +231,46 @@ endif(ZLIB_INSTALL_LIBRARIES) |
|
|
|
|
#============================================================================ |
|
|
|
|
if(ZLIB_BUILD_TESTING) |
|
|
|
|
enable_testing() |
|
|
|
|
add_executable(zlib_example test/example.c) |
|
|
|
|
target_link_libraries(zlib_example ZLIB::ZLIB) |
|
|
|
|
add_test(zlib_example zlib_example) |
|
|
|
|
|
|
|
|
|
add_executable(minigzip test/minigzip.c) |
|
|
|
|
target_link_libraries(minigzip ZLIB::ZLIB) |
|
|
|
|
|
|
|
|
|
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::ZLIB) |
|
|
|
|
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::ZLIB) |
|
|
|
|
endif(HAVE_OFF64_T) |
|
|
|
|
|
|
|
|
|
if(ZLIB_BUILD_SHARED) |
|
|
|
|
add_executable(zlib_example test/example.c) |
|
|
|
|
target_link_libraries(zlib_example ZLIB::ZLIB) |
|
|
|
|
add_test(zlib_example zlib_example) |
|
|
|
|
|
|
|
|
|
add_executable(minigzip test/minigzip.c) |
|
|
|
|
target_link_libraries(minigzip ZLIB::ZLIB) |
|
|
|
|
|
|
|
|
|
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::ZLIB) |
|
|
|
|
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::ZLIB) |
|
|
|
|
endif(HAVE_OFF64_T) |
|
|
|
|
endif(ZLIB_BUILD_SHARED) |
|
|
|
|
|
|
|
|
|
if(ZLIB_BUILD_STATIC) |
|
|
|
|
add_executable(zlib_static_example test/example.c) |
|
|
|
|
target_link_libraries(zlib_static_example ZLIB::ZLIBSTATIC) |
|
|
|
|
add_test(zlib_static_example zlib_static_example) |
|
|
|
|
|
|
|
|
|
add_executable(static_minigzip test/minigzip.c) |
|
|
|
|
target_link_libraries(static_minigzip ZLIB::ZLIBSTATIC) |
|
|
|
|
|
|
|
|
|
if(HAVE_OFF64_T) |
|
|
|
|
add_executable(zlib_static_example64 test/example.c) |
|
|
|
|
target_compile_definitions(zlib_static_example64 PRIVATE LARGEFILE64_SOURCE=1) |
|
|
|
|
target_link_libraries(zlib_static_example64 ZLIB::ZLIBSTATIC) |
|
|
|
|
add_test(zlib_static_example64 zlib_static_example64) |
|
|
|
|
|
|
|
|
|
add_executable(static_minigzip64 test/minigzip.c) |
|
|
|
|
target_compile_definitions(static_minigzip64 PRIVATE LARGEFILE64_SOURCE=1) |
|
|
|
|
target_link_libraries(static_minigzip64 ZLIB::ZLIBSTATIC) |
|
|
|
|
endif(HAVE_OFF64_T) |
|
|
|
|
endif(ZLIB_BUILD_STATIC) |
|
|
|
|
|
|
|
|
|
add_subdirectory(test) |
|
|
|
|
endif(ZLIB_BUILD_TESTING) |
|
|
|
|