diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2026-01-01 14:39:27 +0100 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-01-12 11:07:43 -0800 |
| commit | a8631975bc22fdd19b6b6fe6958ecbf0647e0e77 (patch) | |
| tree | f305f9e311ee397c6a34a99063c3f27d3d97a54a | |
| parent | fb0479a8bdc3364babc9bf10f19ba8e888b9d2d6 (diff) | |
| download | zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.tar.gz zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.tar.bz2 zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.zip | |
CMake: Added contrib/testzlib.
| -rw-r--r-- | contrib/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | contrib/testzlib/CMakeLists.txt | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index fab97ac..3e2eb43 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt | |||
| @@ -38,3 +38,7 @@ zlib_add_contrib_lib(BLAST "blast binary" blast) | |||
| 38 | zlib_add_contrib_lib(IOSTREAM3 "IOStream C++ bindings V3" iostream3) | 38 | zlib_add_contrib_lib(IOSTREAM3 "IOStream C++ bindings V3" iostream3) |
| 39 | zlib_add_contrib_lib(MINIZIP "minizip library" minizip) | 39 | zlib_add_contrib_lib(MINIZIP "minizip library" minizip) |
| 40 | zlib_add_contrib_lib(PUFF "puff decompress library" puff) | 40 | zlib_add_contrib_lib(PUFF "puff decompress library" puff) |
| 41 | |||
| 42 | if(WIN32) | ||
| 43 | zlib_add_contrib_lib(TESTZLIB "testzlib binary" testzlib) | ||
| 44 | endif(WIN32) | ||
diff --git a/contrib/testzlib/CMakeLists.txt b/contrib/testzlib/CMakeLists.txt new file mode 100644 index 0000000..d68b533 --- /dev/null +++ b/contrib/testzlib/CMakeLists.txt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.12...3.31) | ||
| 2 | |||
| 3 | project( | ||
| 4 | testzlib | ||
| 5 | VERSION 1.0.0 | ||
| 6 | LANGUAGES C | ||
| 7 | DESCRIPTION "A little program to test zlib" | ||
| 8 | HOMEPAGE_URL "https://www.zlib.net") | ||
| 9 | |||
| 10 | option(ZLIB_TESTZLIB_BUILD_SHARED "Enable building 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) | ||
| 13 | |||
| 14 | if(ZLIB_TESTZLIB_BUILD_SHARED) | ||
| 15 | add_executable(testzlib testzlib.c) | ||
| 16 | target_link_libraries(testzlib PRIVATE ZLIB::ZLIB) | ||
| 17 | endif(ZLIB_TESTZLIB_BUILD_SHARED) | ||
| 18 | |||
| 19 | if(ZLIB_TESTZLIB_BUILD_STATIC) | ||
| 20 | add_executable(testzlibStatic testzlib.c) | ||
| 21 | target_link_libraries(testzlibStatic PRIVATE ZLIB::ZLIBSTATIC) | ||
| 22 | endif(ZLIB_TESTZLIB_BUILD_STATIC) | ||
