Changeset View
Standalone View
build/premake/extern_libs5.lua
Show First 20 Lines • Show All 259 Lines • ▼ Show 20 Lines | extern_lib_defs = { | ||||
}, | }, | ||||
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) | -- Support GLOOX_CONFIG for overriding the default (pkg-config --cflags gloox) | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
pkgconfig.add_includes("gloox", os.getenv("GLOOX_CONFIG")) | pkgconfig.load("gloox", os.getenv("GLOOX_CONFIG")).add_includes() | ||||
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.load("gloox", os.getenv("GLOOX_CONFIG")).add_links() | ||||
if os.istarget("macosx") then | 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" }, | ||||
}) | }) | ||||
Show All 40 Lines | extern_lib_defs = { | ||||
}, | }, | ||||
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) | -- Support ICU_CONFIG for overriding the default (pkg-config --cflags icu-i18n) | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
pkgconfig.add_includes("icu-i18n", os.getenv("ICU_CONFIG"), "--cppflags") | pkgconfig.load("icu-i18n", os.getenv("ICU_CONFIG")).add_includes("--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.load("icu-i18n", os.getenv("ICU_CONFIG")).add_links("--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 50 Lines • ▼ Show 20 Lines | extern_lib_defs = { | ||||
}, | }, | ||||
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) | -- Support XML2_CONFIG for overriding the default (pkg-config --cflags libxml-2.0) | ||||
-- i.e. on OSX where it gets set in update-workspaces.sh | -- i.e. on OSX where it gets set in update-workspaces.sh | ||||
pkgconfig.add_includes("libxml-2.0", os.getenv("XML2_CONFIG")) | pkgconfig.load("libxml-2.0", os.getenv("XML2_CONFIG")).add_includes() | ||||
end | 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, | ||||
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.load("libxml-2.0", os.getenv("XML2_CONFIG")).add_links() | ||||
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 | ||||
pkgconfig.add_includes("sdl2", os.getenv("SDL2_CONFIG")) | pkgconfig.load("sdl2", os.getenv("SDL2_CONFIG")).add_includes() | ||||
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.load("sdl2", os.getenv("SDL2_CONFIG")).add_links() | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
spidermonkey = { | spidermonkey = { | ||||
compile_settings = function() | compile_settings = function() | ||||
if _OPTIONS["with-system-mozjs52"] then | if _OPTIONS["with-system-mozjs52"] then | ||||
if not _OPTIONS["android"] then | if not _OPTIONS["android"] then | ||||
pkgconfig.add_includes("mozjs-52") | -- Many linux distros package icu headers in with spidermonkey headers, but | ||||
-- do not provide compatible icu library files to go along with them. | |||||
-- | |||||
-- Attempting to use the spidermonkey-icu headers with a distro's | |||||
-- standard-icu lib files causes linking errors. | |||||
-- | |||||
-- Therefore, we set the spidermonkey includes directory to be searched | |||||
-- *after* the standard system includes so gcc/clang finds and includes | |||||
-- compatible icu headers. | |||||
pkgconfig.load("mozjs-52").add_includes_after_system() | |||||
s0600204: I'm not a fan of the `nil, nil,` part myself... | |||||
Done Inline ActionsIt seems to me the add_includes function could be refactored in a "call pkg_config" part, and then several frontend functions "add_includes", "add_system_includes", "add_after_system_includes" or something similar. wraitii: It seems to me the add_includes function could be refactored in a "call pkg_config" part, and… | |||||
Not Done Inline ActionsStan: Maybe https://riptutorial.com/lua/example/4081/default-parameters ? | |||||
end | end | ||||
else | else | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
include_dir = "include-win32" | include_dir = "include-win32" | ||||
buildoptions { "/FI\"js/RequiredDefines.h\"" } | buildoptions { "/FI\"js/RequiredDefines.h\"" } | ||||
else | else | ||||
include_dir = "include-unix" | include_dir = "include-unix" | ||||
end | end | ||||
Not Done Inline ActionsThe option is called --with-system-premake5 unfortunately Well, --with-system-premake5 seems broken since day one it seems, so renaming while fixing update-workspaces.sh may be an option sera: The option is called --with-system-premake5 unfortunately
Well, --with-system-premake5 seems… | |||||
Not Done Inline ActionsNoted. Is there a ticket for --with-system-premake5 not working? s0600204: Noted.
Is there a ticket for `--with-system-premake5` not working? | |||||
Not Done Inline ActionsThere isn't as far as I am aware. Most distributions do not provide it. Stan: There isn't as far as I am aware. Most distributions do not provide it. | |||||
Not Done Inline ActionsDistributions will likely invoke premake directly, so this bug did go unnoticed it seems and no bug report was filed. --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -104,10 +104,11 @@ fi # Now run premake to create the makefiles +cd ../premake/premake5 + premake_command="premake5" if [ "$with_system_premake5" = "false" ]; then # Build bundled premake - cd ../premake/premake5 PREMAKE_BUILD_DIR=build/gmake2.unix # BSD and OS X need different Makefiles case "`uname -s`" in Maybe phrasing it as "system premake" instead of "--with-system-premake" would be better anyway as this is an option for a wrapper instead. sera: Distributions will likely invoke premake directly, so this bug did go unnoticed it seems and no… | |||||
Not Done Inline ActionsCreated #6710 Stan: Created #6710 | |||||
filter "Debug" | filter "Debug" | ||||
sysincludedirs { libraries_source_dir.."spidermonkey/"..include_dir.."-debug" } | sysincludedirs { libraries_source_dir.."spidermonkey/"..include_dir.."-debug" } | ||||
defines { "DEBUG" } | defines { "DEBUG" } | ||||
filter "Release" | filter "Release" | ||||
sysincludedirs { libraries_source_dir.."spidermonkey/"..include_dir.."-release" } | sysincludedirs { libraries_source_dir.."spidermonkey/"..include_dir.."-release" } | ||||
filter { } | filter { } | ||||
end | end | ||||
end, | end, | ||||
link_settings = function() | link_settings = function() | ||||
if _OPTIONS["with-system-mozjs52"] then | if _OPTIONS["with-system-mozjs52"] then | ||||
if _OPTIONS["android"] then | if _OPTIONS["android"] then | ||||
links { "mozjs-52" } | links { "mozjs-52" } | ||||
else | else | ||||
pkgconfig.add_links("mozjs-52") | pkgconfig.load("mozjs-52").add_links() | ||||
end | end | ||||
else | else | ||||
filter { "Debug", "action:vs2015" } | filter { "Debug", "action:vs2015" } | ||||
links { "mozjs52-ps-debug-vc140" } | links { "mozjs52-ps-debug-vc140" } | ||||
filter { "Release", "action:vs2015" } | filter { "Release", "action:vs2015" } | ||||
links { "mozjs52-ps-release-vc140" } | links { "mozjs52-ps-release-vc140" } | ||||
filter { "Debug", "action:not vs*" } | filter { "Debug", "action:not vs*" } | ||||
links { "mozjs52-ps-debug" } | links { "mozjs52-ps-debug" } | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | 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, | -- wxwidgets does not come with a definition file for pkg-config, | ||||
-- so we have to use wxwidgets' own config tool | -- so we have to use wxwidgets' own config tool | ||||
wx_config_path = os.getenv("WX_CONFIG") or "wx-config" | wx_config_path = os.getenv("WX_CONFIG") or "wx-config" | ||||
pkgconfig.add_includes(nil, wx_config_path, "--unicode=yes --cxxflags") | pkgconfig.load(nil, wx_config_path).add_includes("--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") or "wx-config" | wx_config_path = os.getenv("WX_CONFIG") or "wx-config" | ||||
pkgconfig.add_links(nil, wx_config_path, "--unicode=yes --libs std,gl") | pkgconfig.load(nil, wx_config_path).add_links("--unicode=yes --libs std,gl") | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
x11 = { | x11 = { | ||||
compile_settings = function() | compile_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_includes("x11") | pkgconfig.load("x11").add_includes() | ||||
end | end | ||||
end, | end, | ||||
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.load("x11").add_links() | ||||
end | end | ||||
end, | end, | ||||
}, | }, | ||||
xcursor = { | xcursor = { | ||||
link_settings = function() | link_settings = function() | ||||
add_default_links({ | add_default_links({ | ||||
unix_names = { "Xcursor" }, | unix_names = { "Xcursor" }, | ||||
}) | }) | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |
I'm not a fan of the nil, nil, part myself...