[libpng] Replace find_library() with a simple set() for linking libm on UNIX (#8079)

This commit is contained in:
Kai Blaschke 2019-09-13 19:25:09 +02:00 committed by Phil Christensen
parent 16c0aa4579
commit 8887f6c09c
3 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: libpng Source: libpng
Version: 1.6.37-3 Version: 1.6.37-4
Build-Depends: zlib Build-Depends: zlib
Homepage: https://github.com/glennrp/libpng Homepage: https://github.com/glennrp/libpng
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.

View File

@ -0,0 +1,12 @@
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2019-04-14 20:10:32.000000000 +0200
+++ b/CMakeLists.txt 2019-09-06 14:14:39.425498139 +0200
@@ -44,7 +44,7 @@
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 "")

View File

@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master HEAD_REF master
PATCHES PATCHES
use-abort-on-all-platforms.patch use-abort-on-all-platforms.patch
fix-libm-unix.patch
) )
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)