diff --git a/examples/DeferredShading/xmake.lua b/examples/DeferredShading/xmake.lua index 5a2d9461b..4f4b229f7 100644 --- a/examples/DeferredShading/xmake.lua +++ b/examples/DeferredShading/xmake.lua @@ -1,5 +1,3 @@ target("DeferredShading") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics") add_files("main.cpp") diff --git a/examples/DopplerEffect/xmake.lua b/examples/DopplerEffect/xmake.lua index 42fd66ae2..6852238e4 100644 --- a/examples/DopplerEffect/xmake.lua +++ b/examples/DopplerEffect/xmake.lua @@ -1,5 +1,3 @@ target("DopplerEffect") - set_group("Examples") - set_kind("binary") add_deps("NazaraAudio", "NazaraPlatform") add_files("main.cpp") \ No newline at end of file diff --git a/examples/GraphicsTest/xmake.lua b/examples/GraphicsTest/xmake.lua index f2c4d0741..b439049fd 100644 --- a/examples/GraphicsTest/xmake.lua +++ b/examples/GraphicsTest/xmake.lua @@ -1,5 +1,3 @@ target("GraphicsTest") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics") add_files("main.cpp") \ No newline at end of file diff --git a/examples/PhysicallyBasedRendering/xmake.lua b/examples/PhysicallyBasedRendering/xmake.lua index 119c6e096..6af2278d6 100644 --- a/examples/PhysicallyBasedRendering/xmake.lua +++ b/examples/PhysicallyBasedRendering/xmake.lua @@ -1,5 +1,3 @@ target("PBR") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics") add_files("main.cpp") diff --git a/examples/Physics2DDemo/xmake.lua b/examples/Physics2DDemo/xmake.lua index 7501d538c..5742a9436 100644 --- a/examples/Physics2DDemo/xmake.lua +++ b/examples/Physics2DDemo/xmake.lua @@ -1,6 +1,4 @@ target("Physics2DDemo") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics", "NazaraPhysics2D") add_packages("entt") add_files("main.cpp") diff --git a/examples/PhysicsDemo/xmake.lua b/examples/PhysicsDemo/xmake.lua index 65a6f99f7..043087086 100644 --- a/examples/PhysicsDemo/xmake.lua +++ b/examples/PhysicsDemo/xmake.lua @@ -1,6 +1,4 @@ target("PhysicsDemo") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics", "NazaraPhysics3D") add_packages("entt") add_files("main.cpp") diff --git a/examples/PlayMusic/xmake.lua b/examples/PlayMusic/xmake.lua index 32a81eb4c..946c770e3 100644 --- a/examples/PlayMusic/xmake.lua +++ b/examples/PlayMusic/xmake.lua @@ -1,5 +1,3 @@ target("PlayMusic") - set_group("Examples") - set_kind("binary") add_deps("NazaraAudio") add_files("main.cpp") diff --git a/examples/RenderTest/xmake.lua b/examples/RenderTest/xmake.lua index 0e11edc47..1fa819c04 100644 --- a/examples/RenderTest/xmake.lua +++ b/examples/RenderTest/xmake.lua @@ -1,5 +1,3 @@ target("RenderTest") - set_group("Examples") - set_kind("binary") add_deps("NazaraRenderer") add_files("main.cpp") \ No newline at end of file diff --git a/examples/Std140Debug/xmake.lua b/examples/Std140Debug/xmake.lua index f72858562..be6f486d7 100644 --- a/examples/Std140Debug/xmake.lua +++ b/examples/Std140Debug/xmake.lua @@ -1,5 +1,3 @@ target("Std140Debug") - set_group("Examples") - set_kind("binary") add_deps("NazaraOpenGLRenderer") add_files("main.cpp") diff --git a/examples/Tut00/xmake.lua b/examples/Tut00/xmake.lua index abfa3f76c..0a5322b56 100644 --- a/examples/Tut00/xmake.lua +++ b/examples/Tut00/xmake.lua @@ -1,5 +1,3 @@ target("Tut00_EmptyProject") - set_group("Examples") - set_kind("binary") add_deps("NazaraAudio", "NazaraGraphics", "NazaraNetwork", "NazaraPhysics2D", "NazaraPhysics3D", "NazaraRenderer", "NazaraUtility") add_files("main.cpp") diff --git a/examples/Tut01/xmake.lua b/examples/Tut01/xmake.lua index 428d6bb18..40134955e 100644 --- a/examples/Tut01/xmake.lua +++ b/examples/Tut01/xmake.lua @@ -1,6 +1,4 @@ target("Tut01_HelloWorld") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics") add_packages("entt") add_files("main.cpp") diff --git a/examples/Tut02/xmake.lua b/examples/Tut02/xmake.lua index a2a4b59bf..d9ce2d7fc 100644 --- a/examples/Tut02/xmake.lua +++ b/examples/Tut02/xmake.lua @@ -1,6 +1,4 @@ target("Tut02_Events") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics") add_packages("entt") add_files("main.cpp") diff --git a/examples/WidgetDemo/xmake.lua b/examples/WidgetDemo/xmake.lua index 505302ef4..c1273b526 100644 --- a/examples/WidgetDemo/xmake.lua +++ b/examples/WidgetDemo/xmake.lua @@ -1,6 +1,4 @@ target("WidgetDemo") - set_group("Examples") - set_kind("binary") add_deps("NazaraGraphics", "NazaraPhysics3D", "NazaraWidgets") add_packages("entt") add_files("main.cpp") diff --git a/examples/xmake.lua b/examples/xmake.lua new file mode 100644 index 000000000..3802d141d --- /dev/null +++ b/examples/xmake.lua @@ -0,0 +1,14 @@ +option("examples") + set_default(true) + set_showmenu(true) + set_description("Build examples") + +option_end() + +if has_config("examples") then + -- Common config + set_group("Examples") + set_kind("binary") + + includes("*/xmake.lua") +end diff --git a/xmake.lua b/xmake.lua index b0bc5d88e..e63055a06 100644 --- a/xmake.lua +++ b/xmake.lua @@ -312,5 +312,5 @@ end includes("tools/*.lua") includes("tests/*.lua") +includes("examples/*.lua") includes("plugins/*/xmake.lua") -includes("examples/*/xmake.lua")