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 /contrib/testzlib | |
| parent | fb0479a8bdc3364babc9bf10f19ba8e888b9d2d6 (diff) | |
| download | zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.tar.gz zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.tar.bz2 zlib-a8631975bc22fdd19b6b6fe6958ecbf0647e0e77.zip | |
CMake: Added contrib/testzlib.
Diffstat (limited to 'contrib/testzlib')
| -rw-r--r-- | contrib/testzlib/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
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) | ||
