[Premake] Removed unused/unnecessary subprojects.

- Testing currently doesn't work
- VFS Dump is unused. You can use internal function for it
- Demos are only for fun
- Trace Dump & Trace Viewer (unsure, but ok)

You can re-enable them by changing values: enableTests and enableMiscSubprojects in main premake file.

In the future there should be xb command support to overwrite them
This commit is contained in:
Gliniak 2025-04-14 22:17:00 +02:00 committed by Radosław Gliński
parent 7298536d46
commit 31d715d100
10 changed files with 332 additions and 331 deletions

View file

@ -7,6 +7,11 @@ location(build_root)
targetdir(build_bin) targetdir(build_bin)
objdir(build_obj) objdir(build_obj)
-- Define variables for enabling specific submodules
-- Todo: Add changing from xb command
enableTests = false
enableMiscSubprojects = false
-- Define an ARCH variable -- Define an ARCH variable
-- Only use this to enable architecture-specific functionality. -- Only use this to enable architecture-specific functionality.
if os.istarget("linux") then if os.istarget("linux") then

View file

@ -54,11 +54,13 @@ project("xenia-app")
-- Unified library containing all apps as StaticLibs, not just the main -- Unified library containing all apps as StaticLibs, not just the main
-- emulator windowed app. -- emulator windowed app.
kind("SharedLib") kind("SharedLib")
if enableMiscSubprojects then
links({ links({
"xenia-gpu-vulkan-trace-viewer", "xenia-gpu-vulkan-trace-viewer",
"xenia-hid-demo", "xenia-hid-demo",
"xenia-ui-window-vulkan-demo", "xenia-ui-window-vulkan-demo",
}) })
end
filter(NOT_SINGLE_LIBRARY_FILTER) filter(NOT_SINGLE_LIBRARY_FILTER)
kind("WindowedApp") kind("WindowedApp")
@ -114,15 +116,13 @@ project("xenia-app")
"xenia-ui-d3d12", "xenia-ui-d3d12",
}) })
if enableMiscSubprojects then
filter({"platforms:Windows", SINGLE_LIBRARY_FILTER}) filter({"platforms:Windows", SINGLE_LIBRARY_FILTER})
links({ links({
"xenia-gpu-d3d12-trace-viewer", "xenia-gpu-d3d12-trace-viewer",
"xenia-ui-window-d3d12-demo", "xenia-ui-window-d3d12-demo",
}) })
-- filter({"configurations:Release", "platforms:Windows"}) end
-- buildoptions({
-- "/O1",
-- })
filter("platforms:Windows") filter("platforms:Windows")
-- Only create the .user file if it doesn't already exist. -- Only create the .user file if it doesn't already exist.

View file

@ -17,4 +17,6 @@ project("xenia-base")
"debug_visualizers.natvis", "debug_visualizers.natvis",
}) })
include("testing") if enableTests then
include("testing")
end

View file

@ -21,9 +21,7 @@ project("xenia-cpu")
local_platform_files("hir") local_platform_files("hir")
local_platform_files("ppc") local_platform_files("ppc")
include("testing") if enableTests then
include("ppc/testing") include("testing")
-- filter({"configurations:Release", "platforms:Windows"}) include("ppc/testing")
-- buildoptions({ end
-- "/O1",
-- })

View file

@ -19,8 +19,9 @@ project("xenia-gpu-d3d12")
"../shaders/bytecode/d3d12_5_1/*.h", "../shaders/bytecode/d3d12_5_1/*.h",
}) })
group("src") if enableMiscSubprojects then
project("xenia-gpu-d3d12-trace-viewer") group("src")
project("xenia-gpu-d3d12-trace-viewer")
uuid("7b5b9fcb-7bf1-43ff-a774-d4c41c8706be") uuid("7b5b9fcb-7bf1-43ff-a774-d4c41c8706be")
single_library_windowed_app_kind() single_library_windowed_app_kind()
language("C++") language("C++")
@ -72,8 +73,8 @@ project("xenia-gpu-d3d12-trace-viewer")
"xenia-cpu-backend-x64", "xenia-cpu-backend-x64",
}) })
group("src") group("src")
project("xenia-gpu-d3d12-trace-dump") project("xenia-gpu-d3d12-trace-dump")
uuid("686b859c-0046-44c4-a02c-41fc3fb75698") uuid("686b859c-0046-44c4-a02c-41fc3fb75698")
kind("ConsoleApp") kind("ConsoleApp")
language("C++") language("C++")
@ -124,3 +125,4 @@ project("xenia-gpu-d3d12-trace-dump")
links({ links({
"xenia-cpu-backend-x64", "xenia-cpu-backend-x64",
}) })
end

View file

@ -23,8 +23,9 @@ project("xenia-gpu-vulkan")
"../shaders/bytecode/vulkan_spirv/*.h", "../shaders/bytecode/vulkan_spirv/*.h",
}) })
group("src") if enableMiscSubprojects then
project("xenia-gpu-vulkan-trace-viewer") group("src")
project("xenia-gpu-vulkan-trace-viewer")
uuid("86a1dddc-a26a-4885-8c55-cf745225d93e") uuid("86a1dddc-a26a-4885-8c55-cf745225d93e")
single_library_windowed_app_kind() single_library_windowed_app_kind()
language("C++") language("C++")
@ -88,8 +89,8 @@ project("xenia-gpu-vulkan-trace-viewer")
}) })
end end
group("src") group("src")
project("xenia-gpu-vulkan-trace-dump") project("xenia-gpu-vulkan-trace-dump")
uuid("0dd0dd1c-b321-494d-ab9a-6c062f0c65cc") uuid("0dd0dd1c-b321-494d-ab9a-6c062f0c65cc")
kind("ConsoleApp") kind("ConsoleApp")
language("C++") language("C++")
@ -152,3 +153,4 @@ project("xenia-gpu-vulkan-trace-dump")
"1>scratch/stdout-trace-dump.txt", "1>scratch/stdout-trace-dump.txt",
}) })
end end
end

View file

@ -10,18 +10,14 @@ project("xenia-ui-d3d12")
"xenia-base", "xenia-base",
"xenia-ui", "xenia-ui",
}) })
-- filter({"configurations:Release", "platforms:Windows"})
-- buildoptions({
-- "/O1",
-- })
-- filter {}
local_platform_files() local_platform_files()
files({ files({
"../shaders/bytecode/d3d12_5_1/*.h", "../shaders/bytecode/d3d12_5_1/*.h",
}) })
group("demos") if enableMiscSubprojects then
project("xenia-ui-window-d3d12-demo") group("demos")
project("xenia-ui-window-d3d12-demo")
uuid("3b9686a7-0f04-4e17-8b00-aeb78ae1107c") uuid("3b9686a7-0f04-4e17-8b00-aeb78ae1107c")
single_library_windowed_app_kind() single_library_windowed_app_kind()
language("C++") language("C++")
@ -40,3 +36,4 @@ project("xenia-ui-window-d3d12-demo")
resincludedirs({ resincludedirs({
project_root, project_root,
}) })
end

View file

@ -14,10 +14,6 @@ project("xenia-ui")
local_platform_files() local_platform_files()
removefiles({"*_demo.cc"}) removefiles({"*_demo.cc"})
removefiles({"windowed_app_main_*.cc"}) removefiles({"windowed_app_main_*.cc"})
-- filter({"configurations:Release", "platforms:Windows"})
-- buildoptions({
-- "/O1",
-- })
filter("platforms:Android-*") filter("platforms:Android-*")
-- Exports JNI functions. -- Exports JNI functions.
wholelib("On") wholelib("On")

View file

@ -10,11 +10,6 @@ project("xenia-ui-vulkan")
"xenia-base", "xenia-base",
"xenia-ui", "xenia-ui",
}) })
-- filter({"configurations:Release", "platforms:Windows"})
-- buildoptions({
-- "/O1",
-- })
-- filter {}
includedirs({ includedirs({
project_root.."/third_party/Vulkan-Headers/include", project_root.."/third_party/Vulkan-Headers/include",
}) })
@ -24,8 +19,9 @@ project("xenia-ui-vulkan")
"../shaders/bytecode/vulkan_spirv/*.h", "../shaders/bytecode/vulkan_spirv/*.h",
}) })
group("demos") if enableMiscSubprojects then
project("xenia-ui-window-vulkan-demo") group("demos")
project("xenia-ui-window-vulkan-demo")
uuid("97598f13-3177-454c-8e58-c59e2b6ede27") uuid("97598f13-3177-454c-8e58-c59e2b6ede27")
single_library_windowed_app_kind() single_library_windowed_app_kind()
language("C++") language("C++")
@ -54,3 +50,4 @@ project("xenia-ui-window-vulkan-demo")
"xcb", "xcb",
"X11-xcb", "X11-xcb",
}) })
end

View file

@ -7,20 +7,18 @@ project("xenia-vfs")
kind("StaticLib") kind("StaticLib")
language("C++") language("C++")
links({ links({
"xenia-base", "zstd", "zarchive" "xenia-base",
"zstd",
"zarchive"
}) })
defines({ defines({
}) })
-- filter({"configurations:Release", "platforms:Windows"})
-- buildoptions({
-- "/O1",
-- })
-- filter {}
recursive_platform_files() recursive_platform_files()
removefiles({"vfs_dump.cc"}) removefiles({"vfs_dump.cc"})
project("xenia-vfs-dump") if enableMiscSubprojects then
project("xenia-vfs-dump")
uuid("2EF270C7-41A8-4D0E-ACC5-59693A9CCE32") uuid("2EF270C7-41A8-4D0E-ACC5-59693A9CCE32")
kind("ConsoleApp") kind("ConsoleApp")
language("C++") language("C++")
@ -38,4 +36,8 @@ project("xenia-vfs-dump")
resincludedirs({ resincludedirs({
project_root, project_root,
}) })
include("testing") end
if enableTests then
include("testing")
end