Changeset View
Changeset View
Standalone View
Standalone View
build/premake/extern_libs5.lua
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | link_settings = function() | ||||
filter { } | filter { } | ||||
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") | ||||
elseif os.istarget("macosx") then | else | ||||
-- Support GLOOX_CONFIG for overriding the default PATH-based gloox-config | -- Support GLOOX_CONFIG for overriding the default (pkg-config --cflags gloox) | ||||
gloox_config_path = os.getenv("GLOOX_CONFIG") | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
if not gloox_config_path then | pkgconfig.add_includes("gloox", os.getenv("GLOOX_CONFIG")) | ||||
gloox_config_path = "gloox-config" | |||||
end | |||||
pkgconfig.add_includes(nil, gloox_config_path.." --cflags") | |||||
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") | ||||
end | add_default_links({ | ||||
if os.istarget("macosx") then | win_names = { "gloox-1.0" }, | ||||
gloox_config_path = os.getenv("GLOOX_CONFIG") | no_delayload = 1, | ||||
if not gloox_config_path then | }) | ||||
gloox_config_path = "gloox-config" | else | ||||
end | pkgconfig.add_links("gloox", os.getenv("GLOOX_CONFIG")) | ||||
pkgconfig.add_links(nil, gloox_config_path.." --libs") | |||||
if os.istarget("macosx") then | |||||
-- Manually add gnutls dependencies, those are not present in gloox's pkg-config | -- Manually add gnutls dependencies, those are not present in gloox's pkg-config | ||||
add_default_lib_paths("nettle") | add_default_lib_paths("nettle") | ||||
add_default_lib_paths("gmp") | add_default_lib_paths("gmp") | ||||
add_default_links({ | add_default_links({ | ||||
osx_names = { "nettle", "hogweed", "gmp" }, | osx_names = { "nettle", "hogweed", "gmp" }, | ||||
}) | }) | ||||
else | end | ||||
-- TODO: consider using pkg-config on non-Windows (for compile_settings too) | |||||
add_default_links({ | |||||
win_names = { "gloox-1.0" }, | |||||
unix_names = { "gloox" }, | |||||
no_delayload = 1, | |||||
}) | |||||
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 27 Lines | link_settings = function() | ||||
}) | }) | ||||
end | end | ||||
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") | ||||
elseif os.istarget("macosx") then | else | ||||
-- Support ICU_CONFIG for overriding the default PATH-based icu-config | -- Support ICU_CONFIG for overriding the default (pkg-config --cflags icu-i18n) | ||||
icu_config_path = os.getenv("ICU_CONFIG") | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
if not icu_config_path then | pkgconfig.add_includes("icu-i18n", os.getenv("ICU_CONFIG"), "--cppflags") | ||||
icu_config_path = "icu-config" | |||||
end | |||||
pkgconfig.add_includes(nil, icu_config_path.." --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") | ||||
end | |||||
if os.istarget("macosx") then | |||||
icu_config_path = os.getenv("ICU_CONFIG") | |||||
if not icu_config_path then | |||||
icu_config_path = "gloox-config" | |||||
end | |||||
pkgconfig.add_links(nil, icu_config_path.." --ldflags-searchpath --ldflags-libsonly --ldflags-system") | |||||
else | |||||
add_default_links({ | add_default_links({ | ||||
win_names = { "icuuc", "icuin" }, | win_names = { "icuuc", "icuin" }, | ||||
unix_names = { "icui18n", "icuuc" }, | |||||
dbg_suffix = "", | dbg_suffix = "", | ||||
no_delayload = 1, | no_delayload = 1, | ||||
}) | }) | ||||
else | |||||
pkgconfig.add_links("icu-i18n", os.getenv("ICU_CONFIG"), "--ldflags-searchpath --ldflags-libsonly --ldflags-system") | |||||
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") or os.istarget("macosx") then | ||||
add_default_include_paths("libcurl") | add_default_include_paths("libcurl") | ||||
end | end | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | link_settings = function() | ||||
unix_names = { "sodium" }, | unix_names = { "sodium" }, | ||||
}) | }) | ||||
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") | ||||
elseif os.istarget("macosx") then | else | ||||
-- Support XML2_CONFIG for overriding for the default PATH-based xml2-config | -- Support XML2_CONFIG for overriding the default (pkg-config --cflags libxml-2.0) | ||||
xml2_config_path = os.getenv("XML2_CONFIG") | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
if not xml2_config_path then | pkgconfig.add_includes("libxml-2.0", os.getenv("XML2_CONFIG")) | ||||
xml2_config_path = "xml2-config" | |||||
end | end | ||||
if os.istarget("macosx") then | |||||
-- use xml2-config instead of pkg-config on OS X | |||||
pkgconfig.add_includes(nil, xml2_config_path.." --cflags") | |||||
-- 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" } | ||||
else | |||||
pkgconfig.add_includes("libxml-2.0") | |||||
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 { } | ||||
elseif os.istarget("macosx") then | |||||
xml2_config_path = os.getenv("XML2_CONFIG") | |||||
if not xml2_config_path then | |||||
xml2_config_path = "xml2-config" | |||||
end | |||||
pkgconfig.add_links(nil, xml2_config_path.." --libs") | |||||
else | else | ||||
pkgconfig.add_links("libxml-2.0") | pkgconfig.add_links("libxml-2.0", os.getenv("XML2_CONFIG")) | ||||
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") or os.istarget("macosx") then | ||||
add_default_include_paths("miniupnpc") | add_default_include_paths("miniupnpc") | ||||
end | end | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | extern_lib_defs = { | ||||
}, | }, | ||||
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) | -- Support SDL2_CONFIG for overriding the default (pkg-config sdl2) | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
sdl_config_path = os.getenv("SDL2_CONFIG") | pkgconfig.add_includes("sdl2", os.getenv("SDL2_CONFIG")) | ||||
if sdl_config_path then | |||||
pkgconfig.add_includes(nil, sdl_config_path.." --cflags") | |||||
else | |||||
pkgconfig.add_includes("sdl2") | |||||
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("sdl2") | add_default_lib_paths("sdl2") | ||||
elseif not _OPTIONS["android"] then | elseif not _OPTIONS["android"] then | ||||
sdl_config_path = os.getenv("SDL2_CONFIG") | pkgconfig.add_links("sdl2", os.getenv("SDL2_CONFIG")) | ||||
if sdl_config_path then | |||||
pkgconfig.add_links(nil, sdl_config_path.." --libs") | |||||
else | |||||
pkgconfig.add_links("sdl2") | |||||
end | |||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
spidermonkey = { | spidermonkey = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if _OPTIONS["with-system-mozjs38"] then | if _OPTIONS["with-system-mozjs38"] then | ||||
if not _OPTIONS["android"] then | if not _OPTIONS["android"] then | ||||
pkgconfig.add_includes("mozjs-38") | pkgconfig.add_includes("mozjs-38") | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | vorbis = { | ||||
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 | ||||
-- wxwidgets does not come with a definition file for pkg-config, | |||||
-- Support WX_CONFIG for overriding for the default PATH-based wx-config | -- so we have to use wxwidgets' own config tool | ||||
wx_config_path = os.getenv("WX_CONFIG") | wx_config_path = os.getenv("WX_CONFIG") or "wx-config" | ||||
if not wx_config_path then | pkgconfig.add_includes(nil, wx_config_path, "--unicode=yes --cxxflags") | ||||
wx_config_path = "wx-config" | |||||
end | |||||
pkgconfig.add_includes(nil, wx_config_path.." --unicode=yes --cxxflags") | |||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
libdirs { libraries_dir.."wxwidgets/lib/vc_lib" } | libdirs { libraries_dir.."wxwidgets/lib/vc_lib" } | ||||
else | else | ||||
wx_config_path = os.getenv("WX_CONFIG") | wx_config_path = os.getenv("WX_CONFIG") or "wx-config" | ||||
Itms: Maybe the comment from line 634 could be duplicated here, dunno. | |||||
if not wx_config_path then | pkgconfig.add_links(nil, wx_config_path, "--unicode=yes --libs std,gl") | ||||
wx_config_path = "wx-config" | |||||
end | |||||
pkgconfig.add_links(nil, wx_config_path.." --unicode=yes --libs std,gl") | |||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
x11 = { | x11 = { | ||||
compile_settings = function() | |||||
if not os.istarget("windows") and not os.istarget("macosx") then | |||||
pkgconfig.add_includes("x11") | |||||
end | |||||
end, | |||||
link_settings = function() | link_settings = function() | ||||
add_default_links({ | if not os.istarget("windows") and not os.istarget("macosx") then | ||||
win_names = { }, | pkgconfig.add_links("x11") | ||||
unix_names = { "X11" }, | end | ||||
}) | |||||
end, | end, | ||||
}, | }, | ||||
xcursor = { | xcursor = { | ||||
link_settings = function() | link_settings = function() | ||||
add_default_links({ | add_default_links({ | ||||
unix_names = { "Xcursor" }, | unix_names = { "Xcursor" }, | ||||
}) | }) | ||||
end, | end, | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Maybe the comment from line 634 could be duplicated here, dunno.