XMake: Add options to disable tools/plugins and unit tests building
This commit is contained in:
parent
025deb9ae1
commit
22c99bfd1d
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
|
||||
# Setup compilation mode and install project dependencies
|
||||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
run: xmake config --shadernodes=y --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ jobs:
|
|||
|
||||
# Setup compilation mode and install project dependencies
|
||||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
run: xmake config --shadernodes=y --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
|
||||
# Setup compilation mode and install project dependencies
|
||||
- name: Configure xmake and install dependencies
|
||||
run: xmake.exe config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
run: xmake.exe config --shadernodes=y --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --verbose --yes
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
add_requires("assimp")
|
||||
option("assimp")
|
||||
set_default(true)
|
||||
set_showmenu(true)
|
||||
set_description("Build Assimp plugin")
|
||||
|
||||
target("PluginAssimp")
|
||||
option_end()
|
||||
|
||||
if has_config("assimp") then
|
||||
add_requires("assimp")
|
||||
|
||||
target("PluginAssimp")
|
||||
set_kind("shared")
|
||||
set_group("Plugins")
|
||||
|
||||
|
|
@ -11,3 +19,4 @@ target("PluginAssimp")
|
|||
add_headerfiles("**.inl")
|
||||
add_includedirs(".")
|
||||
add_files("**.cpp")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,30 +1,39 @@
|
|||
if is_mode("asan") then
|
||||
option("tests")
|
||||
set_default(true)
|
||||
set_showmenu(true)
|
||||
set_description("Build unit tests")
|
||||
|
||||
option_end()
|
||||
|
||||
if has_config("tests") then
|
||||
if is_mode("asan") then
|
||||
add_defines("CATCH_CONFIG_NO_WINDOWS_SEH")
|
||||
add_defines("CATCH_CONFIG_NO_POSIX_SIGNALS")
|
||||
end
|
||||
end
|
||||
|
||||
add_requires("catch2", "glslang", "spirv-tools")
|
||||
add_requires("catch2", "glslang", "spirv-tools")
|
||||
|
||||
-- Common config
|
||||
set_group("Tests")
|
||||
set_kind("binary")
|
||||
-- Common config
|
||||
set_group("Tests")
|
||||
set_kind("binary")
|
||||
|
||||
add_deps("NazaraCore", "NazaraNetwork", "NazaraPhysics2D", "NazaraShader")
|
||||
add_packages("catch2", "glslang", "spirv-tools")
|
||||
add_headerfiles("Engine/**.hpp")
|
||||
add_files("resources.cpp")
|
||||
add_files("Engine/**.cpp")
|
||||
add_includedirs(".")
|
||||
add_deps("NazaraCore", "NazaraNetwork", "NazaraPhysics2D", "NazaraShader")
|
||||
add_packages("catch2", "glslang", "spirv-tools")
|
||||
add_headerfiles("Engine/**.hpp")
|
||||
add_files("resources.cpp")
|
||||
add_files("Engine/**.cpp")
|
||||
add_includedirs(".")
|
||||
|
||||
--[[if xmake.version():ge("2.5.9") then
|
||||
--[[if xmake.version():ge("2.5.9") then
|
||||
add_rules("c++.unity_build")
|
||||
end]]
|
||||
end]]
|
||||
|
||||
target("NazaraClientUnitTests")
|
||||
target("NazaraClientUnitTests")
|
||||
add_deps("NazaraAudio")
|
||||
add_files("main_client.cpp")
|
||||
|
||||
target("NazaraUnitTests")
|
||||
target("NazaraUnitTests")
|
||||
add_files("main.cpp")
|
||||
remove_headerfiles("Engine/Audio/**")
|
||||
remove_files("Engine/Audio/**")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
option("shadernodes")
|
||||
set_default(false)
|
||||
set_showmenu(true)
|
||||
set_description("Build ShaderNodes tool")
|
||||
|
||||
add_requires("nodeeditor", "qt5core", "qt5gui", "qt5widgets", {debug = is_mode("debug"), optional = true})
|
||||
option_end()
|
||||
|
||||
rule("qt5.env")
|
||||
if has_config("shadernodes") then
|
||||
add_requires("nodeeditor", "qt5core", "qt5gui", "qt5widgets", {debug = is_mode("debug")})
|
||||
|
||||
rule("qt5.env")
|
||||
after_load(function (target)
|
||||
-- retrieve qtbase
|
||||
local qtdir
|
||||
|
|
@ -21,7 +28,7 @@ rule("qt5.env")
|
|||
end)
|
||||
|
||||
|
||||
rule("qt5.moc")
|
||||
rule("qt5.moc")
|
||||
add_deps("qt5.env")
|
||||
set_extensions(".h", ".hpp")
|
||||
before_buildcmd_file(function (target, batchcmds, sourcefile, opt)
|
||||
|
|
@ -91,7 +98,7 @@ rule("qt5.moc")
|
|||
batchcmds:set_depcache(target:dependfile(objectfile))
|
||||
end)
|
||||
|
||||
target("NazaraShaderNodes")
|
||||
target("NazaraShaderNodes")
|
||||
set_group("Tools")
|
||||
set_kind("binary")
|
||||
add_rules("qt5.moc")
|
||||
|
|
@ -106,3 +113,5 @@ target("NazaraShaderNodes")
|
|||
add_includedirs("../src")
|
||||
add_headerfiles("../src/ShaderNode/**.hpp", "../src/ShaderNode/**.inl")
|
||||
add_files("../src/ShaderNode/**.cpp")
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue