diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2026-01-04 11:37:00 +0100 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-01-12 11:10:03 -0800 |
| commit | e62a3ddbe333ec5c65fa048d32abef947d1c74ed (patch) | |
| tree | 1d9e22a0a2f58ae718ac377b2ab50ba4a90ae190 | |
| parent | 883c24b6a25c3e6eeebf02cc19a3e8537ac5614f (diff) | |
| download | zlib-e62a3ddbe333ec5c65fa048d32abef947d1c74ed.tar.gz zlib-e62a3ddbe333ec5c65fa048d32abef947d1c74ed.tar.bz2 zlib-e62a3ddbe333ec5c65fa048d32abef947d1c74ed.zip | |
CMake: Make final fixes for Windows.
| -rw-r--r-- | contrib/blast/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | contrib/blast/test/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | contrib/gcc_gvmat64/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | contrib/iostream3/CMakeLists.txt | 49 | ||||
| -rw-r--r-- | contrib/iostream3/test/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | contrib/minizip/test/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | contrib/puff/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | contrib/puff/test/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | contrib/puff/tester.cmake | 3 |
9 files changed, 74 insertions, 40 deletions
diff --git a/contrib/blast/CMakeLists.txt b/contrib/blast/CMakeLists.txt index 6f3ba38..9b20fda 100644 --- a/contrib/blast/CMakeLists.txt +++ b/contrib/blast/CMakeLists.txt | |||
| @@ -18,6 +18,7 @@ include(CMakePackageConfigHelpers) | |||
| 18 | if(WIN32 OR CYGWIN) | 18 | if(WIN32 OR CYGWIN) |
| 19 | set(zlibblast_static_suffix "s") | 19 | set(zlibblast_static_suffix "s") |
| 20 | set(CMAKE_DEBUG_POSTFIX "d") | 20 | set(CMAKE_DEBUG_POSTFIX "d") |
| 21 | set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) | ||
| 21 | endif(WIN32 OR CYGWIN) | 22 | endif(WIN32 OR CYGWIN) |
| 22 | 23 | ||
| 23 | function(blast_findTestEnv testName) | 24 | function(blast_findTestEnv testName) |
| @@ -29,7 +30,7 @@ function(blast_findTestEnv testName) | |||
| 29 | set(separator ":") | 30 | set(separator ":") |
| 30 | endif() | 31 | endif() |
| 31 | 32 | ||
| 32 | string(APPEND testEnv "$<TARGET_FILE_DIR:ZLIB::ZLIB>${separator}") | 33 | string(APPEND testEnv "$<TARGET_FILE_DIR:BLAST::BLAST>${separator}") |
| 33 | string(APPEND testEnv "$ENV{PATH}") | 34 | string(APPEND testEnv "$ENV{PATH}") |
| 34 | 35 | ||
| 35 | set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}") | 36 | set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}") |
| @@ -114,7 +115,8 @@ if(ZLIB_BLAST_INSTALL) | |||
| 114 | TARGETS zlib_blast_blast | 115 | TARGETS zlib_blast_blast |
| 115 | COMPONENT Runtime | 116 | COMPONENT Runtime |
| 116 | EXPORT zlibBlastSharedExport | 117 | EXPORT zlibBlastSharedExport |
| 117 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | 118 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" |
| 119 | ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| 118 | install( | 120 | install( |
| 119 | EXPORT zlibBlastSharedExport | 121 | EXPORT zlibBlastSharedExport |
| 120 | FILE blast-shared.cmake | 122 | FILE blast-shared.cmake |
diff --git a/contrib/blast/test/CMakeLists.txt b/contrib/blast/test/CMakeLists.txt index d319b82..3940c1c 100644 --- a/contrib/blast/test/CMakeLists.txt +++ b/contrib/blast/test/CMakeLists.txt | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | # if we are built from with zlib, use this path's) | 1 | # if we are built from with zlib, use this path's) |
| 2 | if(DEFINED ZLIB_BUILD_SHARED) | 2 | if(DEFINED ZLIB_BUILD_BLAST) |
| 3 | set(WORK_DIR ${zlib_BINARY_DIR}) | 3 | set(WORK_DIR ${zlib_BINARY_DIR}) |
| 4 | set(inst_setup zlib_blast_install) | 4 | set(inst_setup zlib_install) |
| 5 | else(DEFINED ZLIB_BUILD_SHARED) | 5 | else(DEFINED ZLIB_BUILD_BLAST) |
| 6 | set(WORK_DIR ${blast_BINARY_DIR}) | 6 | set(WORK_DIR ${blast_BINARY_DIR}) |
| 7 | set(inst_setup zlib_blast_install) | 7 | set(inst_setup zlib_blast_install) |
| 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") | 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") |
| @@ -16,7 +16,7 @@ else(DEFINED ZLIB_BUILD_SHARED) | |||
| 16 | set_tests_properties(zlib_blast_install | 16 | set_tests_properties(zlib_blast_install |
| 17 | PROPERTIES | 17 | PROPERTIES |
| 18 | FIXTURES_SETUP zlib_blast_install) | 18 | FIXTURES_SETUP zlib_blast_install) |
| 19 | endif(DEFINED ZLIB_BUILD_SHARED) | 19 | endif(DEFINED ZLIB_BUILD_BLAST) |
| 20 | 20 | ||
| 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) | 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) |
| 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) | 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) |
diff --git a/contrib/gcc_gvmat64/CMakeLists.txt b/contrib/gcc_gvmat64/CMakeLists.txt index 67a6a83..53dd5a1 100644 --- a/contrib/gcc_gvmat64/CMakeLists.txt +++ b/contrib/gcc_gvmat64/CMakeLists.txt | |||
| @@ -5,10 +5,10 @@ enable_language(ASM) | |||
| 5 | 5 | ||
| 6 | set(CMAKE_ASM_COMPILE_OBJECT ${CMAKE_ASM_COMPILE_OBJECT} CACHE INTERNAL "" FORCE) | 6 | set(CMAKE_ASM_COMPILE_OBJECT ${CMAKE_ASM_COMPILE_OBJECT} CACHE INTERNAL "" FORCE) |
| 7 | 7 | ||
| 8 | if(WIN32) | 8 | if(MSVC) |
| 9 | #cmake 4.1 doesn't consider cl an asm compiler | 9 | #cmake 4.1 doesn't consider cl an asm compiler |
| 10 | cmake_policy(SET CMP0194 NEW) | 10 | cmake_policy(SET CMP0194 NEW) |
| 11 | endif(WIN32) | 11 | endif(MSVC) |
| 12 | 12 | ||
| 13 | if(ZLIB_BUILD_SHARED) | 13 | if(ZLIB_BUILD_SHARED) |
| 14 | target_sources(zlib PRIVATE gvmat64.S) | 14 | target_sources(zlib PRIVATE gvmat64.S) |
diff --git a/contrib/iostream3/CMakeLists.txt b/contrib/iostream3/CMakeLists.txt index 33e5b71..e2ac480 100644 --- a/contrib/iostream3/CMakeLists.txt +++ b/contrib/iostream3/CMakeLists.txt | |||
| @@ -32,6 +32,23 @@ if(WIN32 OR CYGWIN) | |||
| 32 | set(CMAKE_DEBUG_POSTFIX "d") | 32 | set(CMAKE_DEBUG_POSTFIX "d") |
| 33 | endif(WIN32 OR CYGWIN) | 33 | endif(WIN32 OR CYGWIN) |
| 34 | 34 | ||
| 35 | |||
| 36 | function(iostreamv3_findTestEnv testName) | ||
| 37 | set(testEnv "PATH=") | ||
| 38 | |||
| 39 | if(MSVC OR MINGW) | ||
| 40 | set(separator "\\\;") | ||
| 41 | else() | ||
| 42 | set(separator ":") | ||
| 43 | endif() | ||
| 44 | |||
| 45 | string(APPEND testEnv "$<TARGET_FILE_DIR:zlib_iostream3_iostreamv3>${separator}") | ||
| 46 | string(APPEND testEnv "$<TARGET_FILE_DIR:ZLIB::ZLIB>${separator}") | ||
| 47 | string(APPEND testEnv "$ENV{PATH}") | ||
| 48 | |||
| 49 | set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}") | ||
| 50 | endfunction(iostreamv3_findTestEnv testName) | ||
| 51 | |||
| 35 | if(ZLIB_IOSTREAM3_BUILD_SHARED) | 52 | if(ZLIB_IOSTREAM3_BUILD_SHARED) |
| 36 | add_library(zlib_iostream3_iostreamv3 SHARED | 53 | add_library(zlib_iostream3_iostreamv3 SHARED |
| 37 | zfstream.cc | 54 | zfstream.cc |
| @@ -46,11 +63,10 @@ if(ZLIB_IOSTREAM3_BUILD_SHARED) | |||
| 46 | VERSION ${iostreamV3_VERSION}) | 63 | VERSION ${iostreamV3_VERSION}) |
| 47 | endif(NOT CYGWIN) | 64 | endif(NOT CYGWIN) |
| 48 | 65 | ||
| 49 | set_target_properties( | 66 | set_target_properties(zlib_iostream3_iostreamv3 |
| 50 | zlib_iostream3_iostreamv3 | 67 | PROPERTIES |
| 51 | PROPERTIES | 68 | EXPORT_NAME IOSTREAMV3 |
| 52 | EXPORT_NAME IOSTREAMV3 | 69 | OUTPUT_NAME iostream3) |
| 53 | OUTPUT_NAME iostream3) | ||
| 54 | 70 | ||
| 55 | target_link_libraries(zlib_iostream3_iostreamv3 | 71 | target_link_libraries(zlib_iostream3_iostreamv3 |
| 56 | PUBLIC ZLIB::ZLIB) | 72 | PUBLIC ZLIB::ZLIB) |
| @@ -61,13 +77,24 @@ if(ZLIB_IOSTREAM3_BUILD_SHARED) | |||
| 61 | add_executable(zlib_iostream3_test test.cc zfstream.h) | 77 | add_executable(zlib_iostream3_test test.cc zfstream.h) |
| 62 | 78 | ||
| 63 | target_link_libraries(zlib_iostream3_test | 79 | target_link_libraries(zlib_iostream3_test |
| 64 | PRIVATE zlib_iostream3_iostream3) | 80 | PRIVATE zlib_iostream3_iostreamv3) |
| 65 | 81 | ||
| 66 | add_test(NAME zlib_iostream3_test COMMAND zlib_iostream3_test) | 82 | add_test(NAME zlib_iostream3_test COMMAND zlib_iostream3_test) |
| 67 | 83 | ||
| 68 | set_tests_properties(zlib_iostream3_test | 84 | set_tests_properties(zlib_iostream3_test |
| 69 | PROPERTIES | 85 | PROPERTIES |
| 70 | FIXTURES_REQUIRED zlib_iostream3_cleanup) | 86 | FIXTURES_REQUIRED zlib_iostream3_cleanup) |
| 87 | |||
| 88 | if(MSVC | ||
| 89 | OR MSYS | ||
| 90 | OR MINGW | ||
| 91 | OR CYGWIN) | ||
| 92 | iostreamv3_findtestenv(zlib_iostream3_test) | ||
| 93 | endif( | ||
| 94 | MSVC | ||
| 95 | OR MSYS | ||
| 96 | OR MINGW | ||
| 97 | OR CYGWIN) | ||
| 71 | endif(ZLIB_IOSTREAM3_BUILD_TESTING) | 98 | endif(ZLIB_IOSTREAM3_BUILD_TESTING) |
| 72 | endif(ZLIB_IOSTREAM3_BUILD_SHARED) | 99 | endif(ZLIB_IOSTREAM3_BUILD_SHARED) |
| 73 | 100 | ||
| @@ -80,7 +107,7 @@ if(ZLIB_IOSTREAM3_BUILD_STATIC) | |||
| 80 | ALIAS zlib_iostream3_iostreamv3Static) | 107 | ALIAS zlib_iostream3_iostreamv3Static) |
| 81 | 108 | ||
| 82 | target_link_libraries(zlib_iostream3_iostreamv3Static | 109 | target_link_libraries(zlib_iostream3_iostreamv3Static |
| 83 | INTERFACE ZLIB::ZLIBSTATIC) | 110 | PUBLIC ZLIB::ZLIBSTATIC) |
| 84 | 111 | ||
| 85 | set_target_properties(zlib_iostream3_iostreamv3Static | 112 | set_target_properties(zlib_iostream3_iostreamv3Static |
| 86 | PROPERTIES | 113 | PROPERTIES |
| @@ -93,7 +120,8 @@ if(ZLIB_IOSTREAM3_BUILD_STATIC) | |||
| 93 | add_executable(zlib_iostream3_testStatic test.cc zfstream.h) | 120 | add_executable(zlib_iostream3_testStatic test.cc zfstream.h) |
| 94 | 121 | ||
| 95 | target_link_libraries(zlib_iostream3_testStatic | 122 | target_link_libraries(zlib_iostream3_testStatic |
| 96 | PRIVATE zlib_iostream3_iostream3Static) | 123 | PRIVATE zlib_iostream3_iostreamv3Static) |
| 124 | |||
| 97 | add_test(NAME zlib_iostream3_testStatic | 125 | add_test(NAME zlib_iostream3_testStatic |
| 98 | COMMAND zlib_iostream3_testStatic) | 126 | COMMAND zlib_iostream3_testStatic) |
| 99 | 127 | ||
| @@ -121,7 +149,8 @@ if(ZLIB_IOSTREAM3_INSTALL) | |||
| 121 | TARGETS zlib_iostream3_iostreamv3 | 149 | TARGETS zlib_iostream3_iostreamv3 |
| 122 | COMPONENT Runtime | 150 | COMPONENT Runtime |
| 123 | EXPORT zlibiostream3SharedExport | 151 | EXPORT zlibiostream3SharedExport |
| 124 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | 152 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" |
| 153 | ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| 125 | install( | 154 | install( |
| 126 | EXPORT zlibiostream3SharedExport | 155 | EXPORT zlibiostream3SharedExport |
| 127 | FILE iostreamv3-shared.cmake | 156 | FILE iostreamv3-shared.cmake |
| @@ -130,7 +159,7 @@ if(ZLIB_IOSTREAM3_INSTALL) | |||
| 130 | 159 | ||
| 131 | if(MSVC) | 160 | if(MSVC) |
| 132 | install( | 161 | install( |
| 133 | FILES $<TARGET_PDB_FILE:zlib_iostream3_iostream3> | 162 | FILES $<TARGET_PDB_FILE:zlib_iostream3_iostreamv3> |
| 134 | COMPONENT Development | 163 | COMPONENT Development |
| 135 | DESTINATION ${CMAKE_INSTALL_BINDIR} | 164 | DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 136 | CONFIGURATIONS Debug OR RelWithDebInfo | 165 | CONFIGURATIONS Debug OR RelWithDebInfo |
diff --git a/contrib/iostream3/test/CMakeLists.txt b/contrib/iostream3/test/CMakeLists.txt index f8b2b51..44e7d60 100644 --- a/contrib/iostream3/test/CMakeLists.txt +++ b/contrib/iostream3/test/CMakeLists.txt | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | # if we are built from with zlib, use this path's) | 1 | # if we are built from with zlib, use this path's) |
| 2 | if(DEFINED ZLIB_BUILD_SHARED) | 2 | if(DEFINED ZLIB_BUILD_IOSTREAM3) |
| 3 | set(WORK_DIR ${zlib_BINARY_DIR}) | 3 | set(WORK_DIR ${zlib_BINARY_DIR}) |
| 4 | set(inst_setup zlib_iostream3_install) | 4 | set(inst_setup zlib_install) |
| 5 | else(DEFINED ZLIB_BUILD_SHARED) | 5 | else(DEFINED ZLIB_BUILD_IOSTREAM3) |
| 6 | set(WORK_DIR ${iostreamV3_BINARY_DIR}) | 6 | set(WORK_DIR ${iostreamV3_BINARY_DIR}) |
| 7 | set(inst_setup zlib_iostream3_install) | 7 | set(inst_setup zlib_iostream3_install) |
| 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") | 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") |
| @@ -16,7 +16,7 @@ else(DEFINED ZLIB_BUILD_SHARED) | |||
| 16 | set_tests_properties(zlib_iostream3_install | 16 | set_tests_properties(zlib_iostream3_install |
| 17 | PROPERTIES | 17 | PROPERTIES |
| 18 | FIXTURES_SETUP zlib_iostream3_install) | 18 | FIXTURES_SETUP zlib_iostream3_install) |
| 19 | endif(DEFINED ZLIB_BUILD_SHARED) | 19 | endif(DEFINED ZLIB_BUILD_IOSTREAM3) |
| 20 | 20 | ||
| 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) | 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) |
| 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) | 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) |
diff --git a/contrib/minizip/test/CMakeLists.txt b/contrib/minizip/test/CMakeLists.txt index 2f86ee3..fc64b9e 100644 --- a/contrib/minizip/test/CMakeLists.txt +++ b/contrib/minizip/test/CMakeLists.txt | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | # if we are built from with zlib, use this path's) | 1 | # if we are built from with zlib, use this path's) |
| 2 | if(DEFINED ZLIB_BUILD_SHARED) | 2 | if(DEFINED ZLIB_BUILD_MINIZIP) |
| 3 | set(WORK_DIR ${zlib_BINARY_DIR}) | 3 | set(WORK_DIR ${zlib_BINARY_DIR}) |
| 4 | set(inst_setup minizip_minizip_install) | 4 | set(inst_setup zlib_install) |
| 5 | else(DEFINED ZLIB_BUILD_SHARED) | 5 | else(DEFINED ZLIB_BUILD_MINIZIP) |
| 6 | set(WORK_DIR ${minizip_BINARY_DIR}) | 6 | set(WORK_DIR ${minizip_BINARY_DIR}) |
| 7 | set(inst_setup minizip_minizip_install) | 7 | set(inst_setup minizip_install) |
| 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") | 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") |
| 9 | 9 | ||
| 10 | add_test( | 10 | add_test( |
| @@ -13,9 +13,10 @@ else(DEFINED ZLIB_BUILD_SHARED) | |||
| 13 | ${CMAKE_CURRENT_BINARY_DIR}/test_install --config $<CONFIG> | 13 | ${CMAKE_CURRENT_BINARY_DIR}/test_install --config $<CONFIG> |
| 14 | WORKING_DIRECTORY ${minizip_BINARY_DIR}) | 14 | WORKING_DIRECTORY ${minizip_BINARY_DIR}) |
| 15 | 15 | ||
| 16 | set_tests_properties(minizip_install PROPERTIES FIXTURES_SETUP | 16 | set_tests_properties(minizip_install |
| 17 | minizip_install) | 17 | PROPERTIES |
| 18 | endif(DEFINED ZLIB_BUILD_SHARED) | 18 | FIXTURES_SETUP minizip_install) |
| 19 | endif(DEFINED ZLIB_BUILD_MINIZIP) | ||
| 19 | 20 | ||
| 20 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) | 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) |
| 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) | 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) |
diff --git a/contrib/puff/CMakeLists.txt b/contrib/puff/CMakeLists.txt index 72a4c6d..2f902c0 100644 --- a/contrib/puff/CMakeLists.txt +++ b/contrib/puff/CMakeLists.txt | |||
| @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12...3.31) | |||
| 2 | 2 | ||
| 3 | project( | 3 | project( |
| 4 | puff | 4 | puff |
| 5 | VERSION 1.0.0 | 5 | VERSION 2.3.0 |
| 6 | LANGUAGES C | 6 | LANGUAGES C |
| 7 | DESCRIPTION "A library for decompressing deflate with very little footprint" | 7 | DESCRIPTION "A library for decompressing deflate with very little footprint" |
| 8 | HOMEPAGE_URL "https://www.zlib.net") | 8 | HOMEPAGE_URL "https://www.zlib.net") |
| @@ -83,7 +83,7 @@ if(ZLIB_PUFF_BUILD_SHARED) | |||
| 83 | EXPORT_NAME PUFF | 83 | EXPORT_NAME PUFF |
| 84 | OUTPUT_NAME puff) | 84 | OUTPUT_NAME puff) |
| 85 | 85 | ||
| 86 | if(ZLIB_PUFF_BUILD_TESTING) | 86 | if(ZLIB_PUFF_BUILD_TESTING AND NOT WIN32) |
| 87 | enable_testing() | 87 | enable_testing() |
| 88 | 88 | ||
| 89 | add_executable(zlib_puff_test pufftest.c puff.h) | 89 | add_executable(zlib_puff_test pufftest.c puff.h) |
| @@ -113,7 +113,7 @@ if(ZLIB_PUFF_BUILD_SHARED) | |||
| 113 | ${GCOV_EXECUTABLE} | 113 | ${GCOV_EXECUTABLE} |
| 114 | ${llvm_option}) | 114 | ${llvm_option}) |
| 115 | endif(GCOV_EXECUTABLE) | 115 | endif(GCOV_EXECUTABLE) |
| 116 | endif(ZLIB_PUFF_BUILD_TESTING) | 116 | endif(ZLIB_PUFF_BUILD_TESTING AND NOT WIN32) |
| 117 | endif(ZLIB_PUFF_BUILD_SHARED) | 117 | endif(ZLIB_PUFF_BUILD_SHARED) |
| 118 | 118 | ||
| 119 | if(ZLIB_PUFF_BUILD_STATIC) | 119 | if(ZLIB_PUFF_BUILD_STATIC) |
| @@ -128,7 +128,7 @@ if(ZLIB_PUFF_BUILD_STATIC) | |||
| 128 | EXPORT_NAME PUFFSTATIC | 128 | EXPORT_NAME PUFFSTATIC |
| 129 | OUTPUT_NAME puff${zlib_puff_static_suffix}) | 129 | OUTPUT_NAME puff${zlib_puff_static_suffix}) |
| 130 | 130 | ||
| 131 | if(ZLIB_PUFF_BUILD_TESTING) | 131 | if(ZLIB_PUFF_BUILD_TESTING AND NOT WIN32) |
| 132 | enable_testing() | 132 | enable_testing() |
| 133 | 133 | ||
| 134 | add_executable(zlib_puff_testStatic pufftest.c puff.h) | 134 | add_executable(zlib_puff_testStatic pufftest.c puff.h) |
| @@ -159,7 +159,7 @@ if(ZLIB_PUFF_BUILD_STATIC) | |||
| 159 | ${GCOV_EXECUTABLE} | 159 | ${GCOV_EXECUTABLE} |
| 160 | ${llvm_option}) | 160 | ${llvm_option}) |
| 161 | endif(GCOV_EXECUTABLE) | 161 | endif(GCOV_EXECUTABLE) |
| 162 | endif(ZLIB_PUFF_BUILD_TESTING) | 162 | endif(ZLIB_PUFF_BUILD_TESTING AND NOT WIN32) |
| 163 | endif(ZLIB_PUFF_BUILD_STATIC) | 163 | endif(ZLIB_PUFF_BUILD_STATIC) |
| 164 | 164 | ||
| 165 | if(ZLIB_PUFF_INSTALL) | 165 | if(ZLIB_PUFF_INSTALL) |
| @@ -168,7 +168,8 @@ if(ZLIB_PUFF_INSTALL) | |||
| 168 | TARGETS zlib_puff_puff | 168 | TARGETS zlib_puff_puff |
| 169 | COMPONENT Runtime | 169 | COMPONENT Runtime |
| 170 | EXPORT puffSharedExport | 170 | EXPORT puffSharedExport |
| 171 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | 171 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" |
| 172 | ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| 172 | install( | 173 | install( |
| 173 | EXPORT puffSharedExport | 174 | EXPORT puffSharedExport |
| 174 | FILE puff-shared.cmake | 175 | FILE puff-shared.cmake |
diff --git a/contrib/puff/test/CMakeLists.txt b/contrib/puff/test/CMakeLists.txt index 1ed39de..2548d57 100644 --- a/contrib/puff/test/CMakeLists.txt +++ b/contrib/puff/test/CMakeLists.txt | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | # if we are built from with zlib, use this path's) | 1 | # if we are built from with zlib, use this path's) |
| 2 | if(DEFINED ZLIB_BUILD_SHARED) | 2 | if(DEFINED ZLIB_BUILD_PUFF) |
| 3 | set(WORK_DIR ${zlib_BINARY_DIR}) | 3 | set(WORK_DIR ${zlib_BINARY_DIR}) |
| 4 | set(inst_setup zlib_puff_install) | 4 | set(inst_setup zlib_install) |
| 5 | else(DEFINED ZLIB_BUILD_SHARED) | 5 | else(DEFINED ZLIB_BUILD_PUFF) |
| 6 | set(WORK_DIR ${puff_BINARY_DIR}) | 6 | set(WORK_DIR ${puff_BINARY_DIR}) |
| 7 | set(inst_setup zlib_puff_install) | 7 | set(inst_setup zlib_puff_install) |
| 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") | 8 | set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}") |
| @@ -16,7 +16,7 @@ else(DEFINED ZLIB_BUILD_SHARED) | |||
| 16 | set_tests_properties(zlib_puff_install | 16 | set_tests_properties(zlib_puff_install |
| 17 | PROPERTIES | 17 | PROPERTIES |
| 18 | FIXTURES_SETUP zlib_puff_install) | 18 | FIXTURES_SETUP zlib_puff_install) |
| 19 | endif(DEFINED ZLIB_BUILD_SHARED) | 19 | endif(DEFINED ZLIB_BUILD_PUFF) |
| 20 | 20 | ||
| 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) | 21 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test) |
| 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) | 22 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test) |
diff --git a/contrib/puff/tester.cmake b/contrib/puff/tester.cmake index d29dc5c..be3b81f 100644 --- a/contrib/puff/tester.cmake +++ b/contrib/puff/tester.cmake | |||
| @@ -8,7 +8,8 @@ cmake_minimum_required(VERSION 3.12...3.31) | |||
| 8 | 8 | ||
| 9 | execute_process(COMMAND ${CMAKE_ARGV3} | 9 | execute_process(COMMAND ${CMAKE_ARGV3} |
| 10 | INPUT_FILE "${CMAKE_ARGV4}/zeros.raw" | 10 | INPUT_FILE "${CMAKE_ARGV4}/zeros.raw" |
| 11 | RESULT_VARIABLE RESULT) | 11 | RESULT_VARIABLE RESULT |
| 12 | COMMAND_ECHO STDERR) | ||
| 12 | 13 | ||
| 13 | if(RESULT) | 14 | if(RESULT) |
| 14 | message(FATAL_ERROR "Command exitited with: ${RESULT}") | 15 | message(FATAL_ERROR "Command exitited with: ${RESULT}") |
