mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
cmake: remove bundled FindZLIB-NG module
find_package(ZLIB-NG QUIET CONFIG) reads zlib-ng's installed zlib-ng-config.cmake and the matching zlib-ng-targets-<config>.cmake files, so the bundled MODULE-mode finder is no longer consulted. The upstream config knows the correct library names per build configuration (including the -ngd debug suffix on MSVC), which the bundled finder didn't. Fixes #952.
This commit is contained in:
parent
74609ad447
commit
434593c8af
1 changed files with 0 additions and 39 deletions
|
|
@ -1,39 +0,0 @@
|
|||
find_path(ZLIB-NG_INCLUDE_DIRS NAMES zlib-ng.h)
|
||||
|
||||
if(ZLIB-NG_INCLUDE_DIRS)
|
||||
set(ZLIB-NG_LIBRARY_DIRS ${ZLIB-NG_INCLUDE_DIRS})
|
||||
|
||||
if("${ZLIB-NG_LIBRARY_DIRS}" MATCHES "/include$")
|
||||
# Strip off the trailing "/include" in the path.
|
||||
get_filename_component(ZLIB-NG_LIBRARY_DIRS ${ZLIB-NG_LIBRARY_DIRS} PATH)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${ZLIB-NG_LIBRARY_DIRS}/lib")
|
||||
set(ZLIB-NG_LIBRARY_DIRS ${ZLIB-NG_LIBRARY_DIRS}/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(LIB_NAMES z-ng zlib-ng libz-ng)
|
||||
else()
|
||||
set(LIB_NAMES zlibstatic-ng libz-ng.a z-ng)
|
||||
endif()
|
||||
|
||||
find_library(ZLIB-NG_LIBRARY NAMES ${LIB_NAMES})
|
||||
|
||||
|
||||
set(ZLIB-NG_LIBRARIES ${ZLIB-NG_LIBRARY})
|
||||
set(ZLIB-NG_INCLUDE_DIRS ${ZLIB-NG_INCLUDE_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZLIB-NG DEFAULT_MSG ZLIB-NG_LIBRARY ZLIB-NG_INCLUDE_DIRS)
|
||||
|
||||
if(ZLIB-NG_INCLUDE_DIRS AND ZLIB-NG_LIBRARIES)
|
||||
set(ZLIB-NG_FOUND ON)
|
||||
else(ZLIB-NG_INCLUDE_DIRS AND ZLIB-NG_LIBRARIES)
|
||||
set(ZLIB-NG_FOUND OFF)
|
||||
endif()
|
||||
|
||||
if(ZLIB-NG_FOUND)
|
||||
message(STATUS "Found zlib-ng: ${ZLIB-NG_LIBRARIES}, ${ZLIB-NG_INCLUDE_DIRS}")
|
||||
endif()
|
||||
Loading…
Add table
Add a link
Reference in a new issue