2020-07-25 02:39:21 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-11-12 04:24:53 +08:00
|
|
|
index 0ad4ba4..a249d42 100644
|
2020-07-25 02:39:21 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2022-11-12 04:24:53 +08:00
|
|
|
@@ -932,12 +932,15 @@ endif()
|
2022-04-19 05:33:43 +08:00
|
|
|
# We use the same files like ./configure, so we have to set its vars.
|
2022-11-12 04:24:53 +08:00
|
|
|
# Only do this on Windows for Cygwin - the files don't make much sense
|
|
|
|
# outside of a UNIX look-alike.
|
2022-04-19 05:33:43 +08:00
|
|
|
-if(NOT WIN32 OR CYGWIN OR MINGW)
|
|
|
|
+if(1)
|
|
|
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
|
|
|
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
|
|
|
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
|
|
|
|
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
|
|
|
- set(LIBS "-lz -lm")
|
|
|
|
+ set(LIBS "")
|
|
|
|
+ if(M_LIBRARY)
|
|
|
|
+ string(APPEND LIBS "-lm")
|
|
|
|
+ endif()
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
2022-11-12 04:24:53 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
|
|
|
@ONLY)
|
|
|
|
@@ -1010,6 +1013,9 @@ if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
|
2022-04-19 05:33:43 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
|
|
|
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
|
|
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
|
|
+elseif(0)
|
2022-11-12 04:24:53 +08:00
|
|
|
# Install the man pages.
|
|
|
|
install(FILES libpng.3 libpngpf.3
|
|
|
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|