mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:29:00 +08:00
7233110263
* [zlib] update to version 1.3.1 * [zlib] adapt patches * [zlib] regenerate version info * [zlib] remove version workaround * [zlib] regenerate version info * CI
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -58,7 +58,7 @@ endif()
|
|
#
|
|
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
|
|
|
-if(MSVC)
|
|
+if(WIN32)
|
|
set(CMAKE_DEBUG_POSTFIX "d")
|
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
|
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
|
@@ -135,7 +135,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
|
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
|
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
|
|
|
-if(MINGW)
|
|
+if(MINGW AND NOT ANDROID)
|
|
# This gets us DLL resource information when compiling on MinGW.
|
|
if(NOT CMAKE_RC_COMPILER)
|
|
set(CMAKE_RC_COMPILER windres.exe)
|
|
@@ -151,7 +151,7 @@ if(MINGW)
|
|
if(BUILD_SHARED_LIBS)
|
|
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
|
endif()
|
|
-endif(MINGW)
|
|
+endif(MINGW AND NOT ANDROID)
|
|
|
|
add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
|
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|