XMake: simplifies option syntax
This commit is contained in:
parent
364d1bafb4
commit
0a8048809c
|
|
@ -1,9 +1,4 @@
|
||||||
option("examples")
|
option("examples", { description = "Build examples", default = true })
|
||||||
set_default(true)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build examples")
|
|
||||||
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
if has_config("examples") then
|
if has_config("examples") then
|
||||||
-- Common config
|
-- Common config
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
option("assimp")
|
option("assimp", { description = "Build Assimp plugin", default = true })
|
||||||
set_default(true)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build Assimp plugin")
|
|
||||||
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
if has_config("assimp") then
|
if has_config("assimp") then
|
||||||
add_requires("assimp v5.2.3")
|
add_requires("assimp v5.2.3")
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
option("ffmpeg")
|
option("ffmpeg", { description = "Build FFmpeg plugin", default = false })
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build FFmpeg plugin")
|
|
||||||
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
if has_config("ffmpeg") then
|
if has_config("ffmpeg") then
|
||||||
add_requires("ffmpeg", { configs = { shared = true } })
|
add_requires("ffmpeg", { configs = { shared = true } })
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
option("tests")
|
option("tests", { description = "Build unit tests", default = false })
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build unit tests")
|
|
||||||
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
if has_config("tests") then
|
if has_config("tests") then
|
||||||
if is_mode("asan") then
|
if is_mode("asan") then
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
option("shadernodes")
|
option("shadernodes", { description = "Build ShaderNodes tool (requires Qt)", default = false })
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build ShaderNodes tool")
|
|
||||||
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
if has_config("shadernodes") then
|
if has_config("shadernodes") then
|
||||||
add_requires("nodeeditor", "qt5core", "qt5gui", "qt5widgets", {debug = is_mode("debug")})
|
add_requires("nodeeditor", "qt5core", "qt5gui", "qt5widgets", {debug = is_mode("debug")})
|
||||||
|
|
|
||||||
41
xmake.lua
41
xmake.lua
|
|
@ -133,41 +133,12 @@ NazaraModules = modules
|
||||||
|
|
||||||
includes("xmake/**.lua")
|
includes("xmake/**.lua")
|
||||||
|
|
||||||
option("compile_shaders")
|
option("compile_shaders", { description = "Compile nzsl shaders into an includable binary version", default = true })
|
||||||
set_default(true)
|
option("embed_rendererbackends", { description = "Embed renderer backend code into NazaraRenderer instead of loading them dynamically", default = false })
|
||||||
set_showmenu(true)
|
option("embed_resources", { description = "Turn builtin resources into includable headers", default = true })
|
||||||
set_description("Compile nzsl shaders into an includable binary version")
|
option("override_runtime", { description = "Override vs runtime to MD in release and MDd in debug", default = true })
|
||||||
option_end()
|
option("usepch", { description = "Use precompiled headers to speedup compilation", default = false })
|
||||||
|
option("unitybuild", { description = "Build the engine using unity build", default = false })
|
||||||
option("embed_rendererbackends")
|
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Embed renderer backend code into NazaraRenderer instead of loading them dynamically")
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
option("embed_resources")
|
|
||||||
set_default(true)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Turn builtin resources into includable headers")
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
option("override_runtime")
|
|
||||||
set_default(true)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Override vs runtime to MD in release and MDd in debug")
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
option("usepch")
|
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Use precompiled headers to speedup compilation")
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
option("unitybuild")
|
|
||||||
set_default(false)
|
|
||||||
set_showmenu(true)
|
|
||||||
set_description("Build the engine using unity build")
|
|
||||||
option_end()
|
|
||||||
|
|
||||||
set_project("NazaraEngine")
|
set_project("NazaraEngine")
|
||||||
set_xmakever("2.6.3")
|
set_xmakever("2.6.3")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue