diff options
| author | Long Nguyen <nguyen.long.908132@gmail.com> | 2020-08-11 05:32:23 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-10 15:32:23 -0700 |
| commit | fca18ba3572f8aebe3b8158c359db62a7e26134e (patch) | |
| tree | f12d1e430165e16fae868fdafc83c33ed686e2a6 /ports/libpng/pkgconfig.2.patch | |
| parent | ffd6ae40d5220e6c9b89bf1eeeb1f2b1b774edce (diff) | |
| download | vcpkg-fca18ba3572f8aebe3b8158c359db62a7e26134e.tar.gz vcpkg-fca18ba3572f8aebe3b8158c359db62a7e26134e.zip | |
[zlib, libpng] Fix pkg-config for mingw (#12753)
* [zlib] Fix pkg-config for mingw
* [libpng] Fix pkg-config for mingw
Diffstat (limited to 'ports/libpng/pkgconfig.2.patch')
| -rw-r--r-- | ports/libpng/pkgconfig.2.patch | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ports/libpng/pkgconfig.2.patch b/ports/libpng/pkgconfig.2.patch index 8deab06d2..99c1b1930 100644 --- a/ports/libpng/pkgconfig.2.patch +++ b/ports/libpng/pkgconfig.2.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6f85d17ef..8de0eb299 100644 ---- a/CMakeLists.txt +index 6451fcf..4090f42 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -814,20 +814,31 @@ endif() +@@ -821,20 +821,31 @@ endif() # 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) @@ -11,22 +11,22 @@ index 6f85d17ef..8de0eb299 100644 - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(LIBS "-lz -lm") -+ set(LIBS "-lz") -+ if(NOT APPLE) -+ 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) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) - create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) +- create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) ++ set(LIBS "-lz") ++ if(NOT APPLE) ++ string(APPEND LIBS " -lm") ++ endif() +else() + if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(LIBS "-lzlibd") ++ set(LIBS "-lzlibd") + else() -+ set(LIBS "-lzlib") ++ set(LIBS "-lzlib") + endif() endif() @@ -41,6 +41,7 @@ index 6f85d17ef..8de0eb299 100644 + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) ++create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) + # SET UP LINKS if(PNG_SHARED) |
