Skip to content

Commit

Permalink
FindZLIB so also ZLIB.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner committed Dec 15, 2024
1 parent 172983e commit 5a60987
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,22 @@ if(ZLIB_INSTALL_LIBRARIES)
endif(ZLIB_BUILD_STATIC)

configure_package_config_file(${zlib_SOURCE_DIR}/zlibConfig.cmake.in
${zlib_BINARY_DIR}/zlibConfig.cmake
${zlib_BINARY_DIR}/ZLIBConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib
NO_CHECK_REQUIRED_COMPONENTS_MACRO)

write_basic_package_version_file(
"${zlib_BINARY_DIR}/zlibConfigVersion.cmake"
"${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake"
VERSION "${zlib_VERSION}"
COMPATIBILITY AnyNewerVersion)

install(FILES
${zlib_BINARY_DIR}/zlibConfig.cmake
${zlib_BINARY_DIR}/zlibConfigVersion.cmake
${zlib_BINARY_DIR}/ZLIBConfig.cmake
${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)

install(EXPORT zlibExport
FILE zlib.cmake
FILE ZLIB.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib
NAMESPACE ZLIB::)

Expand Down
2 changes: 1 addition & 1 deletion contrib/minizip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ check_c_source_compiles(
unset(CMAKE_REQUIRED_FLAGS)

if(NOT TARGET ZLIB::ZLIB)
find_package(zlib REQUIRED)
find_package(ZLIB REQUIRED)
endif(NOT TARGET ZLIB::ZLIB)

set(LIBMINIZIP_SRCS
Expand Down
2 changes: 1 addition & 1 deletion contrib/minizip/minizipConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set(minizip_VERSION @minizip_VERSION@)
set(MINIZIP_ENABLE_BZIP2 @MINIZIP_ENABLE_BZIP2@)
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(zlib)
find_dependency(ZLIB)
INCLUDE (${CMAKE_CURRENT_LIST_DIR}/minizip.cmake)
2 changes: 1 addition & 1 deletion zlibConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set(zlib_VERSION @zlib_VERSION@)
@PACKAGE_INIT@
INCLUDE (${CMAKE_CURRENT_LIST_DIR}/zlib.cmake)
INCLUDE (${CMAKE_CURRENT_LIST_DIR}/ZLIB.cmake)

0 comments on commit 5a60987

Please sign in to comment.