Changeset View
Changeset View
Standalone View
Standalone View
build/premake/premake5.lua
Show First 20 Lines • Show All 572 Lines • ▼ Show 20 Lines | function setup_all_libs () | ||||
source_dirs = { | source_dirs = { | ||||
"network", | "network", | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"enet", | "enet", | ||||
"boost", -- dragged in via server->simulation.h->random | "boost", -- dragged in via server->simulation.h->random | ||||
"fmt", | |||||
} | } | ||||
if not _OPTIONS["without-miniupnpc"] then | if not _OPTIONS["without-miniupnpc"] then | ||||
table.insert(extern_libs, "miniupnpc") | table.insert(extern_libs, "miniupnpc") | ||||
end | end | ||||
setup_static_lib_project("network", source_dirs, extern_libs, {}) | setup_static_lib_project("network", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"third_party/tinygettext/src", | "third_party/tinygettext/src", | ||||
Stan: you missed "fmt" here :) | |||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"iconv", | "iconv", | ||||
"boost", | "boost", | ||||
"fmt", | |||||
} | } | ||||
setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } ) | setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } ) | ||||
-- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output | -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output | ||||
filter "action:vs*" | filter "action:vs*" | ||||
buildoptions { | buildoptions { | ||||
"/wd4127", | "/wd4127", | ||||
"/wd4309", | "/wd4309", | ||||
Show All 17 Lines | if not _OPTIONS["without-lobby"] then | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"boost", | "boost", | ||||
"enet", | "enet", | ||||
"gloox", | "gloox", | ||||
"icu", | "icu", | ||||
"iconv", | "iconv", | ||||
"libsodium", | "libsodium", | ||||
"tinygettext" | "tinygettext", | ||||
"fmt", | |||||
} | } | ||||
setup_static_lib_project("lobby", source_dirs, extern_libs, {}) | setup_static_lib_project("lobby", source_dirs, extern_libs, {}) | ||||
if _OPTIONS["use-shared-glooxwrapper"] and not _OPTIONS["build-shared-glooxwrapper"] then | if _OPTIONS["use-shared-glooxwrapper"] and not _OPTIONS["build-shared-glooxwrapper"] then | ||||
table.insert(static_lib_names_debug, "glooxwrapper_dbg") | table.insert(static_lib_names_debug, "glooxwrapper_dbg") | ||||
table.insert(static_lib_names_release, "glooxwrapper") | table.insert(static_lib_names_release, "glooxwrapper") | ||||
else | else | ||||
source_dirs = { | source_dirs = { | ||||
"lobby/glooxwrapper", | "lobby/glooxwrapper", | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"boost", | "boost", | ||||
"gloox", | "gloox", | ||||
"fmt", | |||||
} | } | ||||
if _OPTIONS["build-shared-glooxwrapper"] then | if _OPTIONS["build-shared-glooxwrapper"] then | ||||
setup_shared_lib_project("glooxwrapper", source_dirs, extern_libs, {}) | setup_shared_lib_project("glooxwrapper", source_dirs, extern_libs, {}) | ||||
else | else | ||||
setup_static_lib_project("glooxwrapper", source_dirs, extern_libs, {}) | setup_static_lib_project("glooxwrapper", source_dirs, extern_libs, {}) | ||||
end | end | ||||
end | end | ||||
else | else | ||||
source_dirs = { | source_dirs = { | ||||
"lobby/scripting", | "lobby/scripting", | ||||
"third_party/encryption" | "third_party/encryption" | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"boost", | "boost", | ||||
"libsodium" | "libsodium", | ||||
"fmt", | |||||
} | } | ||||
setup_static_lib_project("lobby", source_dirs, extern_libs, {}) | setup_static_lib_project("lobby", source_dirs, extern_libs, {}) | ||||
files { source_root.."lobby/Globals.cpp" } | files { source_root.."lobby/Globals.cpp" } | ||||
end | end | ||||
source_dirs = { | source_dirs = { | ||||
"simulation2", | "simulation2", | ||||
"simulation2/components", | "simulation2/components", | ||||
"simulation2/helpers", | "simulation2/helpers", | ||||
"simulation2/scripting", | "simulation2/scripting", | ||||
"simulation2/serialization", | "simulation2/serialization", | ||||
"simulation2/system", | "simulation2/system", | ||||
"simulation2/testcomponents", | "simulation2/testcomponents", | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"boost", | "boost", | ||||
"opengl", | "opengl", | ||||
"spidermonkey", | "spidermonkey", | ||||
"fmt", | |||||
} | } | ||||
setup_static_lib_project("simulation2", source_dirs, extern_libs, {}) | setup_static_lib_project("simulation2", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"scriptinterface", | "scriptinterface", | ||||
"scriptinterface/third_party" | "scriptinterface/third_party" | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"boost", | "boost", | ||||
"spidermonkey", | "spidermonkey", | ||||
"valgrind", | "valgrind", | ||||
"sdl", | "sdl", | ||||
"fmt", | |||||
} | } | ||||
setup_static_lib_project("scriptinterface", source_dirs, extern_libs, {}) | setup_static_lib_project("scriptinterface", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"ps", | "ps", | ||||
"ps/scripting", | "ps/scripting", | ||||
"network/scripting", | "network/scripting", | ||||
"ps/GameSetup", | "ps/GameSetup", | ||||
"ps/XML", | "ps/XML", | ||||
"soundmanager", | "soundmanager", | ||||
"soundmanager/data", | "soundmanager/data", | ||||
"soundmanager/items", | "soundmanager/items", | ||||
"soundmanager/scripting", | "soundmanager/scripting", | ||||
"maths", | "maths", | ||||
"maths/scripting", | "maths/scripting", | ||||
"i18n", | "i18n", | ||||
"i18n/scripting", | "i18n/scripting", | ||||
"third_party/fmt", | |||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"sdl", -- key definitions | "sdl", -- key definitions | ||||
"libxml2", | "libxml2", | ||||
"opengl", | "opengl", | ||||
"zlib", | "zlib", | ||||
"boost", | "boost", | ||||
"enet", | "enet", | ||||
"libcurl", | "libcurl", | ||||
"tinygettext", | "tinygettext", | ||||
"icu", | "icu", | ||||
"iconv", | "iconv", | ||||
"libsodium", | "libsodium", | ||||
"fmt", | |||||
} | } | ||||
if not _OPTIONS["without-audio"] then | if not _OPTIONS["without-audio"] then | ||||
table.insert(extern_libs, "openal") | table.insert(extern_libs, "openal") | ||||
table.insert(extern_libs, "vorbis") | table.insert(extern_libs, "vorbis") | ||||
end | end | ||||
setup_static_lib_project("engine", source_dirs, extern_libs, {}) | setup_static_lib_project("engine", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"graphics", | "graphics", | ||||
"graphics/scripting", | "graphics/scripting", | ||||
"renderer", | "renderer", | ||||
"renderer/scripting", | "renderer/scripting", | ||||
"third_party/mikktspace", | "third_party/mikktspace", | ||||
"third_party/ogre3d_preprocessor" | "third_party/ogre3d_preprocessor" | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"opengl", | "opengl", | ||||
"sdl", -- key definitions | "sdl", -- key definitions | ||||
"spidermonkey", -- for graphics/scripting | "spidermonkey", -- for graphics/scripting | ||||
"boost" | "boost", | ||||
"fmt", | |||||
} | } | ||||
if not _OPTIONS["without-nvtt"] then | if not _OPTIONS["without-nvtt"] then | ||||
table.insert(extern_libs, "nvtt") | table.insert(extern_libs, "nvtt") | ||||
end | end | ||||
setup_static_lib_project("graphics", source_dirs, extern_libs, {}) | setup_static_lib_project("graphics", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"tools/atlas/GameInterface", | "tools/atlas/GameInterface", | ||||
"tools/atlas/GameInterface/Handlers" | "tools/atlas/GameInterface/Handlers" | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"boost", | "boost", | ||||
"sdl", -- key definitions | "sdl", -- key definitions | ||||
"opengl", | "opengl", | ||||
"spidermonkey" | "spidermonkey", | ||||
"fmt", | |||||
} | } | ||||
setup_static_lib_project("atlas", source_dirs, extern_libs, {}) | setup_static_lib_project("atlas", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
"gui", | "gui", | ||||
"gui/ObjectTypes", | "gui/ObjectTypes", | ||||
"gui/ObjectBases", | "gui/ObjectBases", | ||||
"gui/Scripting", | "gui/Scripting", | ||||
"gui/SettingTypes", | "gui/SettingTypes", | ||||
"i18n" | "i18n" | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"sdl", -- key definitions | "sdl", -- key definitions | ||||
"opengl", | "opengl", | ||||
"boost", | "boost", | ||||
"enet", | "enet", | ||||
"tinygettext", | "tinygettext", | ||||
"icu", | "icu", | ||||
"iconv", | "iconv", | ||||
"fmt", | |||||
} | } | ||||
if not _OPTIONS["without-audio"] then | if not _OPTIONS["without-audio"] then | ||||
table.insert(extern_libs, "openal") | table.insert(extern_libs, "openal") | ||||
end | end | ||||
setup_static_lib_project("gui", source_dirs, extern_libs, {}) | setup_static_lib_project("gui", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
Show All 17 Lines | extern_libs = { | ||||
"boost", | "boost", | ||||
"sdl", | "sdl", | ||||
"openal", | "openal", | ||||
"opengl", | "opengl", | ||||
"libpng", | "libpng", | ||||
"zlib", | "zlib", | ||||
"valgrind", | "valgrind", | ||||
"cxxtest", | "cxxtest", | ||||
"fmt", | |||||
} | } | ||||
-- CPU architecture-specific | -- CPU architecture-specific | ||||
if arch == "amd64" then | if arch == "amd64" then | ||||
table.insert(source_dirs, "lib/sysdep/arch/amd64"); | table.insert(source_dirs, "lib/sysdep/arch/amd64"); | ||||
table.insert(source_dirs, "lib/sysdep/arch/x86_x64"); | table.insert(source_dirs, "lib/sysdep/arch/x86_x64"); | ||||
elseif arch == "x86" then | elseif arch == "x86" then | ||||
table.insert(source_dirs, "lib/sysdep/arch/ia32"); | table.insert(source_dirs, "lib/sysdep/arch/ia32"); | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | used_extern_libs = { | ||||
"cxxtest", | "cxxtest", | ||||
"comsuppw", | "comsuppw", | ||||
"enet", | "enet", | ||||
"libcurl", | "libcurl", | ||||
"tinygettext", | "tinygettext", | ||||
"icu", | "icu", | ||||
"iconv", | "iconv", | ||||
"libsodium", | "libsodium", | ||||
"fmt", | |||||
"valgrind", | "valgrind", | ||||
} | } | ||||
if not os.istarget("windows") and not _OPTIONS["android"] and not os.istarget("macosx") then | if not os.istarget("windows") and not _OPTIONS["android"] and not os.istarget("macosx") then | ||||
-- X11 should only be linked on *nix | -- X11 should only be linked on *nix | ||||
table.insert(used_extern_libs, "x11") | table.insert(used_extern_libs, "x11") | ||||
table.insert(used_extern_libs, "xcursor") | table.insert(used_extern_libs, "xcursor") | ||||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
you missed "fmt" here :)