0004-android-and-mingw-fixes.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 6fa5575..7c345db 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -56,7 +56,7 @@ endif()
  6. #
  7. check_include_file(unistd.h Z_HAVE_UNISTD_H)
  8. -if(MSVC)
  9. +if(WIN32)
  10. set(CMAKE_DEBUG_POSTFIX "d")
  11. add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
  12. add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
  13. @@ -133,7 +133,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
  14. string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
  15. "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
  16. -if(MINGW)
  17. +if(MINGW AND NOT ANDROID)
  18. # This gets us DLL resource information when compiling on MinGW.
  19. if(NOT CMAKE_RC_COMPILER)
  20. set(CMAKE_RC_COMPILER windres.exe)
  21. @@ -149,7 +149,7 @@ if(MINGW)
  22. if(BUILD_SHARED_LIBS)
  23. set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
  24. endif()
  25. -endif(MINGW)
  26. +endif(MINGW AND NOT ANDROID)
  27. add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
  28. if (BUILD_SHARED_LIBS)