diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2026-01-04 14:26:33 +0100 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-01-12 11:10:03 -0800 |
| commit | edd88953de3a8560b0925ad0637490925f086317 (patch) | |
| tree | 7d2aa0c60911dc97414ff0798a5ffb5f683d7e20 /contrib/testzlib/CMakeLists.txt | |
| parent | e62a3ddbe333ec5c65fa048d32abef947d1c74ed (diff) | |
| download | zlib-develop.tar.gz zlib-develop.tar.bz2 zlib-develop.zip | |
Diffstat (limited to 'contrib/testzlib/CMakeLists.txt')
| -rw-r--r-- | contrib/testzlib/CMakeLists.txt | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/contrib/testzlib/CMakeLists.txt b/contrib/testzlib/CMakeLists.txt index d68b533..b710c76 100644 --- a/contrib/testzlib/CMakeLists.txt +++ b/contrib/testzlib/CMakeLists.txt | |||
| @@ -9,14 +9,36 @@ project( | |||
| 9 | 9 | ||
| 10 | option(ZLIB_TESTZLIB_BUILD_SHARED "Enable building testzlib" ON) | 10 | option(ZLIB_TESTZLIB_BUILD_SHARED "Enable building testzlib" ON) |
| 11 | option(ZLIB_TESTZLIB_BUILD_STATIC "Enable building static linked testzlib" ON) | 11 | option(ZLIB_TESTZLIB_BUILD_STATIC "Enable building static linked testzlib" ON) |
| 12 | option(ZLIB_TESTZLIB_BUILD_TESTING "Enable building tests for testzlib" ON) | 12 | option(ZLIB_TESTZLIB_INSTALL "Enable installation of testzlib" ON) |
| 13 | 13 | ||
| 14 | if(ZLIB_TESTZLIB_BUILD_SHARED) | 14 | if(ZLIB_TESTZLIB_BUILD_SHARED) |
| 15 | add_executable(testzlib testzlib.c) | 15 | add_executable(zlib_testzlib testzlib.c) |
| 16 | target_link_libraries(testzlib PRIVATE ZLIB::ZLIB) | 16 | target_link_libraries(zlib_testzlib PRIVATE ZLIB::ZLIB) |
| 17 | |||
| 18 | set_target_properties(zlib_testzlib | ||
| 19 | PROPERTIES | ||
| 20 | OUTPUT_NAME testzlib) | ||
| 21 | |||
| 22 | if(ZLIB_TESTZLIB_INSTALL) | ||
| 23 | install( | ||
| 24 | TARGETS zlib_testzlib | ||
| 25 | COMPONENT Runtime | ||
| 26 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
| 27 | endif(ZLIB_TESTZLIB_INSTALL) | ||
| 17 | endif(ZLIB_TESTZLIB_BUILD_SHARED) | 28 | endif(ZLIB_TESTZLIB_BUILD_SHARED) |
| 18 | 29 | ||
| 19 | if(ZLIB_TESTZLIB_BUILD_STATIC) | 30 | if(ZLIB_TESTZLIB_BUILD_STATIC) |
| 20 | add_executable(testzlibStatic testzlib.c) | 31 | add_executable(zlib_testzlibStatic testzlib.c) |
| 21 | target_link_libraries(testzlibStatic PRIVATE ZLIB::ZLIBSTATIC) | 32 | target_link_libraries(zlib_testzlibStatic PRIVATE ZLIB::ZLIBSTATIC) |
| 33 | |||
| 34 | set_target_properties(zlib_testzlibStatic | ||
| 35 | PROPERTIES | ||
| 36 | OUTPUT_NAME testzlibStatic) | ||
| 37 | |||
| 38 | if(ZLIB_TESTZLIB_INSTALL) | ||
| 39 | install( | ||
| 40 | TARGETS zlib_testzlibStatic | ||
| 41 | COMPONENT Runtime | ||
| 42 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
| 43 | endif(ZLIB_TESTZLIB_INSTALL) | ||
| 22 | endif(ZLIB_TESTZLIB_BUILD_STATIC) | 44 | endif(ZLIB_TESTZLIB_BUILD_STATIC) |
