diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2025-12-31 10:54:35 +0100 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-01-12 10:55:15 -0800 |
| commit | fb4bdb74122393e5c3f6ea767d272fed14c5eb60 (patch) | |
| tree | 733476b7bc34a38a4c34e0ee4f78ad8af7eaafd0 /contrib/blast | |
| parent | f7df8cc974c5ca0f2d1ec3a5b93f10dd852973a8 (diff) | |
| download | zlib-fb4bdb74122393e5c3f6ea767d272fed14c5eb60.tar.gz zlib-fb4bdb74122393e5c3f6ea767d272fed14c5eb60.tar.bz2 zlib-fb4bdb74122393e5c3f6ea767d272fed14c5eb60.zip | |
CMake: Unify the options.
Diffstat (limited to 'contrib/blast')
| -rw-r--r-- | contrib/blast/CMakeLists.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/contrib/blast/CMakeLists.txt b/contrib/blast/CMakeLists.txt index 6357fcbb..12c08a6f 100644 --- a/contrib/blast/CMakeLists.txt +++ b/contrib/blast/CMakeLists.txt | |||
| @@ -9,6 +9,10 @@ project( | |||
| 9 | DESCRIPTION "A library for creating zipfiles based in zlib" | 9 | DESCRIPTION "A library for creating zipfiles based in zlib" |
| 10 | HOMEPAGE_URL "https://www.zlib.net") | 10 | HOMEPAGE_URL "https://www.zlib.net") |
| 11 | 11 | ||
| 12 | option(ZLIB_BLAST_BUILD_SHARED "Enable building blast shared library" ON) | ||
| 13 | option(ZLIB_BLAST_BUILD_STATIC "Enable building blast static library" ON) | ||
| 14 | option(ZLIB_BLAST_BUILD_TESTING "Enable building tests for blast" ON) | ||
| 15 | |||
| 12 | if(WIN32 OR CYGWIN) | 16 | if(WIN32 OR CYGWIN) |
| 13 | set(zlibAda_static_suffix "s") | 17 | set(zlibAda_static_suffix "s") |
| 14 | set(CMAKE_DEBUG_POSTFIX "d") | 18 | set(CMAKE_DEBUG_POSTFIX "d") |
| @@ -29,12 +33,12 @@ function(blast_findTestEnv testName) | |||
| 29 | set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}") | 33 | set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}") |
| 30 | endfunction(blast_findTestEnv testName) | 34 | endfunction(blast_findTestEnv testName) |
| 31 | 35 | ||
| 32 | if(ZLIBBLAST_BUILD_SHARED) | 36 | if(ZLIB_BLAST_BUILD_SHARED) |
| 33 | add_library(blast SHARED | 37 | add_library(blast SHARED |
| 34 | blast.c | 38 | blast.c |
| 35 | blast.h) | 39 | blast.h) |
| 36 | 40 | ||
| 37 | if(ZLIBBLAST_BUILD_TESTING) | 41 | if(ZLIB_BLAST_BUILD_TESTING) |
| 38 | enable_testing() | 42 | enable_testing() |
| 39 | add_executable(blast-test blast-test.c) | 43 | add_executable(blast-test blast-test.c) |
| 40 | target_link_libraries(blast-test blast) | 44 | target_link_libraries(blast-test blast) |
| @@ -55,10 +59,10 @@ if(ZLIBBLAST_BUILD_SHARED) | |||
| 55 | OR MSYS | 59 | OR MSYS |
| 56 | OR MINGW | 60 | OR MINGW |
| 57 | OR CYGWIN) | 61 | OR CYGWIN) |
| 58 | endif(ZLIBBLAST_BUILD_TESTING) | 62 | endif(ZLIB_BLAST_BUILD_TESTING) |
| 59 | endif(ZLIBBLAST_BUILD_SHARED) | 63 | endif(ZLIB_BLAST_BUILD_SHARED) |
| 60 | 64 | ||
| 61 | if(ZLIBBLAST_BUILD_STATIC) | 65 | if(ZLIB_BLAST_BUILD_STATIC) |
| 62 | add_library(blastStatic STATIC | 66 | add_library(blastStatic STATIC |
| 63 | blast.c | 67 | blast.c |
| 64 | blast.h) | 68 | blast.h) |
| @@ -67,7 +71,7 @@ if(ZLIBBLAST_BUILD_STATIC) | |||
| 67 | PROPERTIES | 71 | PROPERTIES |
| 68 | OUTPUT_NAME blast${minizip_static_suffix}) | 72 | OUTPUT_NAME blast${minizip_static_suffix}) |
| 69 | 73 | ||
| 70 | if(ZLIBBLAST_BUILD_TESTING) | 74 | if(ZLIB_BLAST_BUILD_TESTING) |
| 71 | enable_testing() | 75 | enable_testing() |
| 72 | add_executable(blast-testStatic blast-test.c) | 76 | add_executable(blast-testStatic blast-test.c) |
| 73 | target_link_libraries(blast-testStatic blastStatic) | 77 | target_link_libraries(blast-testStatic blastStatic) |
| @@ -77,5 +81,5 @@ if(ZLIBBLAST_BUILD_STATIC) | |||
| 77 | "$<TARGET_FILE:blast-testStatic>" | 81 | "$<TARGET_FILE:blast-testStatic>" |
| 78 | "${CMAKE_CURRENT_SOURCE_DIR}" | 82 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 79 | "${CMAKE_CURRENT_BINARY_DIR}") | 83 | "${CMAKE_CURRENT_BINARY_DIR}") |
| 80 | endif(ZLIBBLAST_BUILD_TESTING) | 84 | endif(ZLIB_BLAST_BUILD_TESTING) |
| 81 | endif(ZLIBBLAST_BUILD_STATIC) | 85 | endif(ZLIB_BLAST_BUILD_STATIC) |
