Files
kiwix-build/patches/zlib_std_libname.patch
Matthieu Gautier 640750e1ab zlib patch to use std name for lib.
Use a standard name libz.(so|a) if we are using mingw (as we do on linux).

This patch somehow deprecate the previous commit (patch) but both patches
are the right thing to do.
We need this one especially for others dependencies using pkg-config.
The generated .pc always use the '-lz' option and so, we need the correct
names for the lib.
2017-02-07 12:06:41 +01:00

16 lines
776 B
Diff

diff -ur zlib-1.2.8/CMakeLists.txt zlib-1.2.8.std_libname/CMakeLists.txt
--- zlib-1.2.8/CMakeLists.txt 2013-04-29 00:57:10.000000000 +0200
+++ zlib-1.2.8.std_libname/CMakeLists.txt 2017-02-07 11:56:21.826507000 +0100
@@ -205,6 +205,9 @@
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
+elseif(MINGW)
+ # On unix-like platforms the library is almost always called libz
+ set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
elseif(BUILD_SHARED_LIBS AND WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
Only in zlib-1.2.8: zconf.h
Only in zlib-1.2.8.std_libname: zconf.h.included