diff options
| -rw-r--r-- | contrib/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | contrib/ada/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | contrib/iostream3/CMakeLists.txt | 92 |
3 files changed, 103 insertions, 2 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index cf5c1e0..13fe2d4 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | option(ZLIB_BUILD_ADA "Enable building of Ada bindings" OFF) | 1 | option(ZLIB_BUILD_ADA "Enable building of Ada bindings" OFF) |
| 2 | option(ZLIB_BUILD_BLAST "Enable building of blast binary" OFF) | 2 | option(ZLIB_BUILD_BLAST "Enable building of blast binary" OFF) |
| 3 | option(ZLIB_BUILD_IOSTREAM3 "Build with IOStream C++ bindings V3" OFF) | ||
| 3 | option(ZLIB_BUILD_MINIZIP "Enable building libminizip contrib library" OFF) | 4 | option(ZLIB_BUILD_MINIZIP "Enable building libminizip contrib library" OFF) |
| 4 | option(ZLIB_WITH_GVMAT64 | 5 | option(ZLIB_WITH_GVMAT64 |
| 5 | "Enable an optiomized longest_match for 32 bits x86_64" | 6 | "Enable an optiomized longest_match for 32 bits x86_64" |
| @@ -30,6 +31,14 @@ endif(ZLIB_BUILD_MINIZIP) | |||
| 30 | if(ZLIB_WITH_GVMAT64) | 31 | if(ZLIB_WITH_GVMAT64) |
| 31 | add_subdirectory(gcc_gvmat64/) | 32 | add_subdirectory(gcc_gvmat64/) |
| 32 | endif(ZLIB_WITH_GVMAT64) | 33 | endif(ZLIB_WITH_GVMAT64) |
| 34 | |||
| 33 | if(ZLIB_WITH_INFBACK9) | 35 | if(ZLIB_WITH_INFBACK9) |
| 34 | add_subdirectory(infback9/) | 36 | add_subdirectory(infback9/) |
| 35 | endif(ZLIB_WITH_INFBACK9) | 37 | endif(ZLIB_WITH_INFBACK9) |
| 38 | |||
| 39 | if(ZLIB_BUILD_IOSTREAM3) | ||
| 40 | set(ZLIB_IOSTREAM3_BUILD_SHARED ${ZLIB_BUILD_SHARED}) | ||
| 41 | set(ZLIB_IOSTREAM3_BUILD_STATIC ${ZLIB_BUILD_STATIC}) | ||
| 42 | set(ZLIB_IOSTREAM3_TESTING ${ZLIB_BUILD_TESTING}) | ||
| 43 | add_subdirectory(iostream3/) | ||
| 44 | endif(ZLIB_BUILD_IOSTREAM3) | ||
diff --git a/contrib/ada/CMakeLists.txt b/contrib/ada/CMakeLists.txt index cb8b156..3ede5f9 100644 --- a/contrib/ada/CMakeLists.txt +++ b/contrib/ada/CMakeLists.txt | |||
| @@ -14,7 +14,7 @@ option(ZLIB_ADA_BUILD_STATIC "Enable building ada bindings static library" ON) | |||
| 14 | option(ZLIB_ADA_BUILD_TESTING "Enable building tests for ada bindings library" ON) | 14 | option(ZLIB_ADA_BUILD_TESTING "Enable building tests for ada bindings library" ON) |
| 15 | 15 | ||
| 16 | if(WIN32 OR CYGWIN) | 16 | if(WIN32 OR CYGWIN) |
| 17 | set(zlibAda_static_suffix "s") | 17 | set(zlib_Ada_static_suffix "s") |
| 18 | set(CMAKE_DEBUG_POSTFIX "d") | 18 | set(CMAKE_DEBUG_POSTFIX "d") |
| 19 | endif(WIN32 OR CYGWIN) | 19 | endif(WIN32 OR CYGWIN) |
| 20 | 20 | ||
| @@ -150,7 +150,7 @@ if(ZLIB_ADA_BUILD_STATIC) | |||
| 150 | INTERFACE ZLIB::ZLIBSTATIC) | 150 | INTERFACE ZLIB::ZLIBSTATIC) |
| 151 | 151 | ||
| 152 | set_target_properties(zlib-AdaStatic | 152 | set_target_properties(zlib-AdaStatic |
| 153 | PROPERTIES OUTPUT_NAME zlib-Ada${zlibAda_static_suffix}) | 153 | PROPERTIES OUTPUT_NAME zlib-Ada${zlib_Ada_static_suffix}) |
| 154 | 154 | ||
| 155 | ada_add_library(zlib-streamsStatic STATIC | 155 | ada_add_library(zlib-streamsStatic STATIC |
| 156 | zlib-streams.adb) | 156 | zlib-streams.adb) |
diff --git a/contrib/iostream3/CMakeLists.txt b/contrib/iostream3/CMakeLists.txt new file mode 100644 index 0000000..0f3bcd8 --- /dev/null +++ b/contrib/iostream3/CMakeLists.txt | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.12...3.31) | ||
| 2 | |||
| 3 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") | ||
| 4 | |||
| 5 | project( | ||
| 6 | iostreamsV3 | ||
| 7 | VERSION 1.0.0 | ||
| 8 | LANGUAGES CXX | ||
| 9 | DESCRIPTION "A library for using C++ IOStreams with zlib V3" | ||
| 10 | HOMEPAGE_URL "https://www.zlib.net") | ||
| 11 | |||
| 12 | option(ZLIB_IOSTREAM3_BUILD_SHARED "Enable building blast shared library" ON) | ||
| 13 | option(ZLIB_IOSTREAM3_BUILD_STATIC "Enable building blast static library" ON) | ||
| 14 | option(ZLIB_IOSTREAM3_BUILD_TESTING "Enable building tests for blast" ON) | ||
| 15 | |||
| 16 | if(NOT DEFINED ZLIB_BUILD_IOSTREAM3) | ||
| 17 | if(ZLIB_IOSTREAM3_BUILD_SHARED) | ||
| 18 | list(APPEND REQUIRED_COMPONENTS "shared") | ||
| 19 | endif(ZLIB_IOSTREAM3_BUILD_SHARED) | ||
| 20 | |||
| 21 | if(ZLIB_IOSTREAM3_BUILD_STATIC) | ||
| 22 | list(APPEND REQUIRED_COMPONENTS "static") | ||
| 23 | endif(ZLIB_IOSTREAM3_BUILD_STATIC) | ||
| 24 | |||
| 25 | find_package(ZLIB REQUIRED COMPONENTS ${REQUIRED_COMPONENTS} CONFIG) | ||
| 26 | endif(NOT DEFINED ZLIB_BUILD_IOSTREAM3) | ||
| 27 | |||
| 28 | if(WIN32 OR CYGWIN) | ||
| 29 | set(zlibIOStream3_static_suffix "s") | ||
| 30 | set(CMAKE_DEBUG_POSTFIX "d") | ||
| 31 | endif(WIN32 OR CYGWIN) | ||
| 32 | |||
| 33 | if(ZLIB_IOSTREAM3_BUILD_SHARED) | ||
| 34 | add_library(zlib-iostream3 SHARED | ||
| 35 | zfstream.cc | ||
| 36 | zfstream.h) | ||
| 37 | |||
| 38 | target_link_libraries(zlib-iostream3 | ||
| 39 | PUBLIC ZLIB::ZLIB) | ||
| 40 | |||
| 41 | if(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
| 42 | enable_testing() | ||
| 43 | |||
| 44 | add_executable(iostream-test test.cc) | ||
| 45 | |||
| 46 | target_link_libraries(iostream-test | ||
| 47 | PRIVATE zlib-iostream3) | ||
| 48 | |||
| 49 | add_test(NAME zlib_iostream3_test COMMAND iostream-test) | ||
| 50 | |||
| 51 | set_tests_properties(zlib_iostream3_test | ||
| 52 | PROPERTIES | ||
| 53 | FIXTURES_REQUIRED iostream3_cleanup) | ||
| 54 | endif(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
| 55 | endif(ZLIB_IOSTREAM3_BUILD_SHARED) | ||
| 56 | |||
| 57 | if(ZLIB_IOSTREAM3_BUILD_STATIC) | ||
| 58 | add_library(zlib-iostream3Static STATIC | ||
| 59 | zfstream.cc | ||
| 60 | zfstream.h) | ||
| 61 | |||
| 62 | target_link_libraries(zlib-iostream3Static | ||
| 63 | INTERFACE ZLIB::ZLIBSTATIC) | ||
| 64 | |||
| 65 | set_target_properties(zlib-iostream3Static | ||
| 66 | PROPERTIES | ||
| 67 | OUTPUT_NAME zlib-iostream3${zlib_IOStream3_static_suffix}) | ||
| 68 | |||
| 69 | if(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
| 70 | enable_testing() | ||
| 71 | |||
| 72 | add_executable(iostream-testStatic test.cc) | ||
| 73 | |||
| 74 | target_link_libraries(iostream-testStatic | ||
| 75 | PRIVATE zlib-iostream3Static) | ||
| 76 | add_test(NAME zlib_iostream3_testStatic COMMAND iostream-testStatic) | ||
| 77 | |||
| 78 | set_tests_properties(zlib_iostream3_testStatic | ||
| 79 | PROPERTIES | ||
| 80 | FIXTURES_REQUIRED iostream3_cleanup) | ||
| 81 | endif(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
| 82 | endif(ZLIB_IOSTREAM3_BUILD_STATIC) | ||
| 83 | |||
| 84 | if(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
| 85 | add_test(NAME zlib_iostream3_cleanup COMMAND ${CMAKE_COMMAND} -E rm | ||
| 86 | ${CMAKE_CURRENT_BINARY_DIR}/test1.txt.gz | ||
| 87 | ${CMAKE_CURRENT_BINARY_DIR}/test2.txt.gz) | ||
| 88 | |||
| 89 | set_tests_properties(zlib_iostream3_cleanup | ||
| 90 | PROPERTIES | ||
| 91 | FIXTURES_CLEANUP zlib_iostream3_cleanup) | ||
| 92 | endif(ZLIB_IOSTREAM3_BUILD_TESTING) | ||
