1
0

cmake.patch 877 B

123456789101112131415161718192021222324252627
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index a8e5100..0ccac52 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -40,11 +40,11 @@ option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF)
  6. if(NOT PNG_BUILD_ZLIB)
  7. find_package(ZLIB REQUIRED)
  8. - include_directories(${ZLIB_INCLUDE_DIR})
  9. + set(ZLIB_LIBRARY ZLIB::ZLIB)
  10. endif()
  11. if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
  12. - find_library(M_LIBRARY m)
  13. + set(M_LIBRARY m)
  14. else()
  15. # libm is not needed and/or not available
  16. set(M_LIBRARY "")
  17. @@ -557,7 +557,7 @@ if(PNG_STATIC)
  18. # MSVC doesn't use a different file extension for shared vs. static
  19. # libs. We are able to change OUTPUT_NAME to remove the _static
  20. # for all other platforms.
  21. - if(NOT MSVC)
  22. + if(1)
  23. set_target_properties(png_static PROPERTIES
  24. OUTPUT_NAME "${PNG_LIB_NAME}"
  25. CLEAN_DIRECT_OUTPUT 1)