Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/build/premake/extern_libs5.lua
Show All 33 Lines | |||||
end | end | ||||
local function add_third_party_include_paths(extern_lib) | local function add_third_party_include_paths(extern_lib) | ||||
sysincludedirs { third_party_source_dir .. extern_lib .. "/include" } | sysincludedirs { third_party_source_dir .. extern_lib .. "/include" } | ||||
end | end | ||||
pkgconfig = require "pkgconfig" | pkgconfig = require "pkgconfig" | ||||
-- Configure pkgconfig for MacOSX systems | |||||
if os.istarget("macosx") then | |||||
pkgconfig.additional_pc_path = libraries_dir .. "pkgconfig/" | |||||
pkgconfig.static_link_libs = true | |||||
end | |||||
local function add_delayload(name, suffix, def) | local function add_delayload(name, suffix, def) | ||||
if def["no_delayload"] then | if def["no_delayload"] then | ||||
return | return | ||||
end | end | ||||
-- currently only supported by VC; nothing to do on other platforms. | -- currently only supported by VC; nothing to do on other platforms. | ||||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | extern_lib_defs = { | ||||
}, | }, | ||||
cxxtest = { | cxxtest = { | ||||
compile_settings = function() | compile_settings = function() | ||||
sysincludedirs { libraries_source_dir .. "cxxtest-4.4" } | sysincludedirs { libraries_source_dir .. "cxxtest-4.4" } | ||||
end, | end, | ||||
}, | }, | ||||
enet = { | enet = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("enet") | add_default_include_paths("enet") | ||||
else | |||||
pkgconfig.add_includes("libenet") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_lib_paths("enet") | add_default_lib_paths("enet") | ||||
end | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "enet" }, | win_names = { "enet" }, | ||||
unix_names = { "enet" }, | |||||
}) | }) | ||||
else | |||||
pkgconfig.add_links("libenet") | |||||
end | |||||
end, | end, | ||||
}, | }, | ||||
fcollada = { | fcollada = { | ||||
compile_settings = function() | compile_settings = function() | ||||
add_source_include_paths("fcollada") | add_source_include_paths("fcollada") | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
add_source_lib_paths("fcollada") | add_source_lib_paths("fcollada") | ||||
Show All 9 Lines | link_settings = function() | ||||
filter "Release" | filter "Release" | ||||
links { "FColladaSR" } | links { "FColladaSR" } | ||||
filter { } | filter { } | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
fmt = { | fmt = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("fmt") | add_default_include_paths("fmt") | ||||
elseif os.istarget("macosx") then | |||||
pkgconfig.add_includes("fmt") | |||||
end | end | ||||
-- With Linux & BSD, we assume that fmt is installed in a standard location. | -- With Linux & BSD, we assume that fmt is installed in a standard location. | ||||
-- | -- | ||||
-- It would be nice to not assume, and to instead use pkgconfig: however that | -- It would be nice to not assume, and to instead use pkg-config: however that | ||||
-- requires fmt 5.3.0 or greater. | -- requires fmt 5.3.0 or greater. | ||||
-- | -- | ||||
-- Unfortunately (at the time of writing) only 69 out of 95 (~72.6%) of distros | -- Unfortunately (at the time of writing) only 92 out of 114 (~80.7%) of distros | ||||
-- that provide a fmt package meet this, according to | -- that provide a fmt package meet this, according to | ||||
-- https://repology.org/badge/vertical-allrepos/fmt.svg?minversion=5.3 | -- https://repology.org/badge/vertical-allrepos/fmt.svg?minversion=5.3 | ||||
-- | -- | ||||
-- Whilst that might seem like a healthy majority, this does not include the 2018 | -- Whilst that might seem like a healthy majority, this does not include the 2018 | ||||
-- Long Term Support and 2019.10 releases of Ubuntu - not only popular and widely | -- Long Term Support and 2019.10 releases of Ubuntu - not only popular and widely | ||||
-- used as-is, but which are also used as a base for other popular distros (e.g. | -- used as-is, but which are also used as a base for other popular distros (e.g. | ||||
-- Mint). | -- Mint). | ||||
-- | -- | ||||
-- When fmt 5.3 (or better) becomes more widely used, then we can safely use the | -- When fmt 5.3 (or better) becomes more widely used, then we can safely use the | ||||
-- following line: | -- same line as we currently use for osx | ||||
-- pkgconfig.add_includes("fmt") | |||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | |||||
add_default_lib_paths("fmt") | |||||
end | |||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("fmt") | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "fmt" }, | win_names = { "fmt" }, | ||||
dbg_suffix = "d", | dbg_suffix = "d", | ||||
no_delayload = 1, | no_delayload = 1, | ||||
}) | }) | ||||
elseif os.istarget("macosx") then | |||||
-- See comment above as to why this is not also used on Linux or BSD. | |||||
pkgconfig.add_links("fmt") | |||||
else | else | ||||
add_default_links({ | add_default_links({ | ||||
unix_names = { "fmt" }, | unix_names = { "fmt" }, | ||||
}) | }) | ||||
-- See comment above as to why this is commented out. | |||||
-- pkgconfig.add_links("fmt") | |||||
end | end | ||||
end | end | ||||
}, | }, | ||||
gloox = { | gloox = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("gloox") | add_default_include_paths("gloox") | ||||
else | else | ||||
-- Support GLOOX_CONFIG for overriding the default (pkg-config --cflags gloox) | pkgconfig.add_includes("gloox") | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | |||||
pkgconfig.add_includes("gloox", os.getenv("GLOOX_CONFIG")) | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("gloox") | add_default_lib_paths("gloox") | ||||
add_default_links({ | add_default_links({ | ||||
win_names = { "gloox-1.0" }, | win_names = { "gloox-1.0" }, | ||||
no_delayload = 1, | no_delayload = 1, | ||||
}) | }) | ||||
else | else | ||||
pkgconfig.add_links("gloox", os.getenv("GLOOX_CONFIG")) | pkgconfig.add_links("gloox") | ||||
if os.istarget("macosx") then | if os.istarget("macosx") then | ||||
-- Manually add gnutls dependencies, those are not present in gloox's pkg-config | -- gloox depends on gnutls, but doesn't identify this via pkg-config | ||||
add_default_lib_paths("nettle") | pkgconfig.add_links("gnutls") | ||||
add_default_lib_paths("gmp") | |||||
add_default_links({ | |||||
osx_names = { "nettle", "hogweed", "gmp" }, | |||||
}) | |||||
end | end | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
iconv = { | iconv = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("iconv") | add_default_include_paths("iconv") | ||||
defines { "HAVE_ICONV_CONST" } | defines { "HAVE_ICONV_CONST" } | ||||
Show All 20 Lines | link_settings = function() | ||||
-- glibc (used on Linux and GNU/kFreeBSD) has iconv | -- glibc (used on Linux and GNU/kFreeBSD) has iconv | ||||
end, | end, | ||||
}, | }, | ||||
icu = { | icu = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("icu") | add_default_include_paths("icu") | ||||
else | else | ||||
-- Support ICU_CONFIG for overriding the default (pkg-config --cflags icu-i18n) | pkgconfig.add_includes("icu-i18n") | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | |||||
pkgconfig.add_includes("icu-i18n", os.getenv("ICU_CONFIG"), "--cppflags") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("icu") | add_default_lib_paths("icu") | ||||
add_default_links({ | add_default_links({ | ||||
win_names = { "icuuc", "icuin" }, | win_names = { "icuuc", "icuin" }, | ||||
dbg_suffix = "", | dbg_suffix = "", | ||||
no_delayload = 1, | no_delayload = 1, | ||||
}) | }) | ||||
else | else | ||||
pkgconfig.add_links("icu-i18n", os.getenv("ICU_CONFIG"), "--ldflags-searchpath --ldflags-libsonly --ldflags-system") | pkgconfig.add_links("icu-i18n") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
libcurl = { | libcurl = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("libcurl") | add_default_include_paths("libcurl") | ||||
else | |||||
pkgconfig.add_includes("libcurl") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_lib_paths("libcurl") | add_default_lib_paths("libcurl") | ||||
else | |||||
pkgconfig.add_links("libcurl") | |||||
end | end | ||||
add_default_links({ | add_default_links({ | ||||
win_names = { "libcurl" }, | win_names = { "libcurl" }, | ||||
unix_names = { "curl" }, | osx_frameworks = { "Security" }, -- Not supplied by curl's pkg-config | ||||
osx_names = { "curl", "z" }, | |||||
osx_frameworks = { "Security" } | |||||
}) | }) | ||||
end, | end, | ||||
}, | }, | ||||
libpng = { | libpng = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("libpng") | add_default_include_paths("libpng") | ||||
else | else | ||||
-- Support LIBPNG_CONFIG for overriding the default (pkg-config --cflags libpng) | pkgconfig.add_includes("libpng") | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | |||||
pkgconfig.add_includes("libpng", os.getenv("LIBPNG_CONFIG")) | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("libpng") | add_default_lib_paths("libpng") | ||||
add_default_links({ | add_default_links({ | ||||
win_names = { "libpng16" }, | win_names = { "libpng16" }, | ||||
}) | }) | ||||
else | else | ||||
pkgconfig.add_links("libpng", os.getenv("LIBPNG_CONFIG"), "--ldflags") | pkgconfig.add_links("libpng") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
libsodium = { | libsodium = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("libsodium") | add_default_include_paths("libsodium") | ||||
else | |||||
pkgconfig.add_includes("libsodium") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_lib_paths("libsodium") | add_default_lib_paths("libsodium") | ||||
end | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "libsodium" }, | win_names = { "libsodium" }, | ||||
unix_names = { "sodium" }, | |||||
}) | }) | ||||
else | |||||
pkgconfig.add_links("libsodium") | |||||
end | |||||
end, | end, | ||||
}, | }, | ||||
libxml2 = { | libxml2 = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("libxml2") | add_default_include_paths("libxml2") | ||||
else | else | ||||
-- Support XML2_CONFIG for overriding the default (pkg-config --cflags libxml-2.0) | pkgconfig.add_includes("libxml-2.0") | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | |||||
pkgconfig.add_includes("libxml-2.0", os.getenv("XML2_CONFIG")) | |||||
end | |||||
if os.istarget("macosx") then | if os.istarget("macosx") then | ||||
-- libxml2 needs _REENTRANT or __MT__ for thread support; | -- libxml2 needs _REENTRANT or __MT__ for thread support; | ||||
-- OS X doesn't get either set by default, so do it manually | -- OS X doesn't get either set by default, so do it manually | ||||
defines { "_REENTRANT" } | defines { "_REENTRANT" } | ||||
end | end | ||||
end | |||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("libxml2") | add_default_lib_paths("libxml2") | ||||
filter "Debug" | filter "Debug" | ||||
links { "libxml2" } | links { "libxml2" } | ||||
filter "Release" | filter "Release" | ||||
links { "libxml2" } | links { "libxml2" } | ||||
filter { } | filter { } | ||||
else | else | ||||
pkgconfig.add_links("libxml-2.0", os.getenv("XML2_CONFIG")) | pkgconfig.add_links("libxml-2.0") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
miniupnpc = { | miniupnpc = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("miniupnpc") | add_default_include_paths("miniupnpc") | ||||
elseif os.istarget("macosx") then | |||||
pkgconfig.add_includes("miniupnpc") | |||||
end | end | ||||
-- On Linux and BSD systems we assume miniupnpc is installed in a standard location. | |||||
-- | |||||
-- Support for pkg-config was added in v2.1 of miniupnpc (May 2018). However, the | |||||
-- implementation was flawed - it provided the wrong path to the project's headers. | |||||
-- This was corrected in v2.2.1 (December 2020). | |||||
-- | |||||
-- At the time of writing, of the 123 Linux and BSD package repositories tracked by | |||||
-- Repology that supply a version of miniupnpc: | |||||
-- * 88 (~71.54%) have >= v2.1, needed to locate libraries | |||||
-- * 50 (~40.65%) have >= v2.2.1, needed to (correctly) locate headers | |||||
-- | |||||
-- Once more recent versions become more widespread, we can safely start to use | |||||
-- pkg-config to find miniupnpc on Linux and BSD systems. | |||||
-- https://repology.org/badge/vertical-allrepos/miniupnpc.svg?minversion=2.2.1 | |||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_lib_paths("miniupnpc") | add_default_lib_paths("miniupnpc") | ||||
end | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "miniupnpc" }, | win_names = { "miniupnpc" }, | ||||
}) | |||||
elseif os.istarget("macosx") then | |||||
pkgconfig.add_links("miniupnpc") | |||||
else | |||||
-- Once miniupnpc v2.1 or better becomes near-universal (see above comment), | |||||
-- we can use pkg-config for Linux and BSD. | |||||
add_default_links({ | |||||
unix_names = { "miniupnpc" }, | unix_names = { "miniupnpc" }, | ||||
}) | }) | ||||
end | |||||
end, | end, | ||||
}, | }, | ||||
nvtt = { | nvtt = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if not _OPTIONS["with-system-nvtt"] then | if not _OPTIONS["with-system-nvtt"] then | ||||
add_source_include_paths("nvtt") | add_source_include_paths("nvtt") | ||||
end | end | ||||
defines { "NVTT_SHARED=1" } | defines { "NVTT_SHARED=1" } | ||||
Show All 9 Lines | link_settings = function() | ||||
dbg_suffix = "", -- for performance we always use the release-mode version | dbg_suffix = "", -- for performance we always use the release-mode version | ||||
}) | }) | ||||
end, | end, | ||||
}, | }, | ||||
openal = { | openal = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("openal") | add_default_include_paths("openal") | ||||
elseif not os.istarget("macosx") then | |||||
pkgconfig.add_includes("openal") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("openal") | add_default_lib_paths("openal") | ||||
end | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "openal32" }, | win_names = { "openal32" }, | ||||
unix_names = { "openal" }, | |||||
osx_frameworks = { "OpenAL" }, | |||||
dbg_suffix = "", | dbg_suffix = "", | ||||
no_delayload = 1, -- delayload seems to cause errors on startup | no_delayload = 1, -- delayload seems to cause errors on startup | ||||
}) | }) | ||||
elseif os.istarget("macosx") then | |||||
add_default_links({ | |||||
osx_frameworks = { "OpenAL" }, | |||||
}) | |||||
else | |||||
pkgconfig.add_links("openal") | |||||
end | |||||
end, | end, | ||||
}, | }, | ||||
opengl = { | opengl = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("opengl") | add_default_include_paths("opengl") | ||||
elseif _OPTIONS["gles"] then | |||||
pkgconfig.add_includes("glesv2") | |||||
elseif not os.istarget("macosx") then | |||||
pkgconfig.add_includes("gl") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("opengl") | add_default_lib_paths("opengl") | ||||
end | |||||
if _OPTIONS["gles"] then | |||||
add_default_links({ | add_default_links({ | ||||
unix_names = { "GLESv2" }, | win_names = { "opengl32", "gdi32" }, | ||||
dbg_suffix = "", | dbg_suffix = "", | ||||
no_delayload = 1, -- delayload seems to cause errors on startup | |||||
}) | }) | ||||
else | elseif os.istarget("macosx") then | ||||
add_default_links({ | add_default_links({ | ||||
win_names = { "opengl32", "gdi32" }, | |||||
unix_names = { "GL" }, | |||||
osx_frameworks = { "OpenGL" }, | osx_frameworks = { "OpenGL" }, | ||||
dbg_suffix = "", | |||||
no_delayload = 1, -- delayload seems to cause errors on startup | |||||
}) | }) | ||||
elseif _OPTIONS["gles"] then | |||||
pkgconfig.add_links("glesv2") | |||||
else | |||||
pkgconfig.add_links("gl") | |||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
sdl = { | sdl = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
includedirs { libraries_dir .. "sdl2/include/SDL" } | includedirs { libraries_dir .. "sdl2/include/SDL" } | ||||
elseif not _OPTIONS["android"] then | elseif not _OPTIONS["android"] then | ||||
-- Support SDL2_CONFIG for overriding the default (pkg-config sdl2) | pkgconfig.add_includes("sdl2") | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | |||||
pkgconfig.add_includes("sdl2", os.getenv("SDL2_CONFIG")) | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("sdl2") | add_default_lib_paths("sdl2") | ||||
elseif not _OPTIONS["android"] then | elseif not _OPTIONS["android"] then | ||||
pkgconfig.add_links("sdl2", os.getenv("SDL2_CONFIG")) | pkgconfig.add_links("sdl2") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
spidermonkey = { | spidermonkey = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if _OPTIONS["with-system-mozjs"] then | if _OPTIONS["with-system-mozjs"] then | ||||
if not _OPTIONS["android"] then | if not _OPTIONS["android"] then | ||||
pkgconfig.add_includes("mozjs-78") | pkgconfig.add_includes("mozjs-78") | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | compile_settings = function() | ||||
defines { "CONFIG2_VALGRIND=1" } | defines { "CONFIG2_VALGRIND=1" } | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
vorbis = { | vorbis = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_include_paths("vorbis") | add_default_include_paths("vorbis") | ||||
elseif os.istarget("macosx") then | else | ||||
add_default_include_paths("libogg") | pkgconfig.add_includes("ogg") | ||||
add_default_include_paths("vorbis") | pkgconfig.add_includes("vorbisfile") | ||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
add_default_lib_paths("vorbis") | add_default_lib_paths("vorbis") | ||||
elseif os.istarget("macosx") then | add_default_links({ | ||||
add_default_lib_paths("libogg") | win_names = { "libvorbisfile" }, | ||||
add_default_lib_paths("vorbis") | }) | ||||
end | elseif os.getversion().description == "OpenBSD" then | ||||
-- TODO: We need to force linking with these as currently | -- TODO: We need to force linking with these as currently | ||||
-- they need to be loaded explicitly on execution | -- they need to be loaded explicitly on execution | ||||
if os.getversion().description == "OpenBSD" then | |||||
add_default_links({ | add_default_links({ | ||||
unix_names = { "ogg", | unix_names = { "ogg", "vorbis" }, | ||||
"vorbis" }, | |||||
}) | }) | ||||
else | |||||
pkgconfig.add_links("vorbisfile") | |||||
end | end | ||||
add_default_links({ | |||||
win_names = { "libvorbisfile" }, | |||||
unix_names = { "vorbisfile" }, | |||||
osx_names = { "vorbis", "vorbisenc", "vorbisfile", "ogg" }, | |||||
}) | |||||
end, | end, | ||||
}, | }, | ||||
wxwidgets = { | wxwidgets = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
includedirs { libraries_dir.."wxwidgets/include/msvc" } | includedirs { libraries_dir.."wxwidgets/include/msvc" } | ||||
add_default_include_paths("wxwidgets") | add_default_include_paths("wxwidgets") | ||||
else | else | ||||
Show All 21 Lines | x11 = { | ||||
link_settings = function() | link_settings = function() | ||||
if not os.istarget("windows") and not os.istarget("macosx") then | if not os.istarget("windows") and not os.istarget("macosx") then | ||||
pkgconfig.add_links("x11") | pkgconfig.add_links("x11") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
zlib = { | zlib = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_include_paths("zlib") | add_default_include_paths("zlib") | ||||
else | |||||
pkgconfig.add_includes("zlib") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") or os.istarget("macosx") then | if os.istarget("windows") then | ||||
add_default_lib_paths("zlib") | add_default_lib_paths("zlib") | ||||
end | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "zlib1" }, | win_names = { "zlib1" }, | ||||
unix_names = { "z" }, | |||||
no_delayload = 1, | no_delayload = 1, | ||||
}) | }) | ||||
else | |||||
pkgconfig.add_links("zlib") | |||||
end | |||||
end, | end, | ||||
}, | }, | ||||
} | } | ||||
-- add a set of external libraries to the project; takes care of | -- add a set of external libraries to the project; takes care of | ||||
-- include / lib path and linking against the import library. | -- include / lib path and linking against the import library. | ||||
-- extern_libs: table of library names [string] | -- extern_libs: table of library names [string] | ||||
Show All 22 Lines |
Wildfire Games · Phabricator