XMake: Add options to disable tools/plugins and unit tests building

This commit is contained in:
Jérôme Leclercq 2022-01-18 06:15:51 +01:00
parent 025deb9ae1
commit 22c99bfd1d
6 changed files with 168 additions and 141 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,11 @@
option("assimp")
set_default(true)
set_showmenu(true)
set_description("Build Assimp plugin")
option_end()
if has_config("assimp") then
add_requires("assimp")
target("PluginAssimp")
@ -11,3 +19,4 @@ target("PluginAssimp")
add_headerfiles("**.inl")
add_includedirs(".")
add_files("**.cpp")
end

View File

@ -1,3 +1,11 @@
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")
@ -28,3 +36,4 @@ target("NazaraUnitTests")
add_files("main.cpp")
remove_headerfiles("Engine/Audio/**")
remove_files("Engine/Audio/**")
end

View File

@ -1,5 +1,12 @@
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()
if has_config("shadernodes") then
add_requires("nodeeditor", "qt5core", "qt5gui", "qt5widgets", {debug = is_mode("debug")})
rule("qt5.env")
after_load(function (target)
@ -106,3 +113,5 @@ target("NazaraShaderNodes")
add_includedirs("../src")
add_headerfiles("../src/ShaderNode/**.hpp", "../src/ShaderNode/**.inl")
add_files("../src/ShaderNode/**.cpp")
end