2019-12-24 07:26:04 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-04-19 05:33:43 +08:00
|
|
|
index a8e5100..0ccac52 100644
|
2019-12-24 07:26:04 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2022-04-19 05:33:43 +08:00
|
|
|
@@ -40,11 +40,11 @@ option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF)
|
|
|
|
|
|
|
|
if(NOT PNG_BUILD_ZLIB)
|
|
|
|
find_package(ZLIB REQUIRED)
|
|
|
|
- include_directories(${ZLIB_INCLUDE_DIR})
|
|
|
|
+ set(ZLIB_LIBRARY ZLIB::ZLIB)
|
2019-12-24 07:26:04 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
|
|
|
|
- find_library(M_LIBRARY m)
|
|
|
|
+ set(M_LIBRARY m)
|
|
|
|
else()
|
|
|
|
# libm is not needed and/or not available
|
|
|
|
set(M_LIBRARY "")
|
2022-04-19 05:33:43 +08:00
|
|
|
@@ -557,7 +557,7 @@ if(PNG_STATIC)
|
2019-12-24 07:26:04 +08:00
|
|
|
# MSVC doesn't use a different file extension for shared vs. static
|
|
|
|
# libs. We are able to change OUTPUT_NAME to remove the _static
|
|
|
|
# for all other platforms.
|
|
|
|
- if(NOT MSVC)
|
2022-04-19 05:33:43 +08:00
|
|
|
+ if(1)
|
|
|
|
set_target_properties(png_static PROPERTIES
|
|
|
|
OUTPUT_NAME "${PNG_LIB_NAME}"
|
|
|
|
CLEAN_DIRECT_OUTPUT 1)
|