mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 11:19:00 +08:00
7cd3196145
* Fix unused CMake variable warning * Acquire msys only on Windows * Revise APNG variable names and usage * Fix download mode usability with APNG * Uncompress APNG patch with gzip gzip is a default package of MSYS2 and (most) other systems. 7z download is implemented for windows only. * Revise main CMake patches cmake.patch deals with libpng build configuration. fix-export-targets deals with cmake config export. * Revise pkgconfig patching and fixup * Additional cleanup * Add usage based on FindPNG.cmake * Update versions Co-authored-by: Leonid Pospelov <pospelovlm@yandex.ru>
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0ccac52..218747a 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -820,12 +820,15 @@ endif()
|
|
# We use the same files like ./configure, so we have to set its vars.
|
|
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
|
# of a UNIX look-alike.
|
|
-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
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
|
create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
|
|
@@ -894,6 +897,9 @@ if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
|
|
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)
|
|
# Install man pages
|
|
if(NOT PNG_MAN_DIR)
|
|
set(PNG_MAN_DIR "share/man")
|