Use pkgconfig to find libpng
Should hopefully resolve an issue raised on IRC by @spcman and @Xavi92 Reviewed By: wraitii Differential Revision: https://code.wildfiregames.com/D3610 This was SVN commit r24998.
This commit is contained in:
parent
2d9db5ade6
commit
c879308ad6
@ -411,24 +411,23 @@ extern_lib_defs = {
|
||||
},
|
||||
libpng = {
|
||||
compile_settings = function()
|
||||
if os.istarget("windows") or os.istarget("macosx") then
|
||||
if os.istarget("windows") then
|
||||
add_default_include_paths("libpng")
|
||||
end
|
||||
if os.getversion().description == "OpenBSD" then
|
||||
sysincludedirs { "/usr/local/include/libpng" }
|
||||
else
|
||||
-- Support LIBPNG_CONFIG for overriding the default (pkg-config --cflags libpng)
|
||||
-- i.e. on OSX where it gets set in update-workspaces.sh
|
||||
pkgconfig.add_includes("libpng", os.getenv("LIBPNG_CONFIG"))
|
||||
end
|
||||
end,
|
||||
link_settings = function()
|
||||
if os.istarget("windows") or os.istarget("macosx") then
|
||||
if os.istarget("windows") then
|
||||
add_default_lib_paths("libpng")
|
||||
end
|
||||
add_default_links({
|
||||
win_names = { "libpng16" },
|
||||
unix_names = { "png" },
|
||||
-- Otherwise ld will sometimes pull in ancient 1.2 from the SDK, which breaks the build :/
|
||||
-- TODO: Figure out why that happens
|
||||
osx_names = { "png16" },
|
||||
})
|
||||
else
|
||||
pkgconfig.add_links("libpng", os.getenv("LIBPNG_CONFIG"), "--ldflags")
|
||||
end
|
||||
end,
|
||||
},
|
||||
libsodium = {
|
||||
|
@ -73,6 +73,7 @@ if [ "`uname -s`" = "Darwin" ]; then
|
||||
# Set *_CONFIG variables on OS X, to override the path to e.g. sdl2-config
|
||||
export GLOOX_CONFIG=${GLOOX_CONFIG:="$(pwd)/../../libraries/osx/gloox/bin/gloox-config"}
|
||||
export ICU_CONFIG=${ICU_CONFIG:="$(pwd)/../../libraries/osx/icu/bin/icu-config"}
|
||||
export LIBPNG_CONFIG=${PNG_CONFIG:="$(pwd)/../../libraries/osx/libpng/bin/libpng-config"}
|
||||
export SDL2_CONFIG=${SDL2_CONFIG:="$(pwd)/../../libraries/osx/sdl2/bin/sdl2-config"}
|
||||
export WX_CONFIG=${WX_CONFIG:="$(pwd)/../../libraries/osx/wxwidgets/bin/wx-config"}
|
||||
export XML2_CONFIG=${XML2_CONFIG:="$(pwd)/../../libraries/osx/libxml2/bin/xml2-config"}
|
||||
|
Loading…
Reference in New Issue
Block a user