aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54b3f24..3cd986b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project(zlib
4 LANGUAGES C 4 LANGUAGES C
5 VERSION 1.3.1.1) 5 VERSION 1.3.1.1)
6 6
7option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) 7option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" ON)
8option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON) 8option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON)
9option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON) 9option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON)
10option(ZLIB_INSTALL_LIBRARIES "Enable installation of zlib" ON) 10option(ZLIB_INSTALL_LIBRARIES "Enable installation of zlib" ON)
@@ -193,7 +193,8 @@ endif(ZLIB_INSTALL_LIBRARIES)
193#============================================================================ 193#============================================================================
194# Example binaries 194# Example binaries
195#============================================================================ 195#============================================================================
196if(ZLIB_BUILD_EXAMPLES) 196if(ZLIB_BUILD_TESTING)
197 enable_testing()
197 add_executable(zlib_example test/example.c) 198 add_executable(zlib_example test/example.c)
198 target_link_libraries(zlib_example zlib) 199 target_link_libraries(zlib_example zlib)
199 add_test(zlib_example zlib_example) 200 add_test(zlib_example zlib_example)
@@ -211,4 +212,4 @@ if(ZLIB_BUILD_EXAMPLES)
211 target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) 212 target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1)
212 target_link_libraries(minigzip64 zlib) 213 target_link_libraries(minigzip64 zlib)
213 endif(HAVE_OFF64_T) 214 endif(HAVE_OFF64_T)
214endif(ZLIB_BUILD_EXAMPLES) 215endif(ZLIB_BUILD_TESTING)