[Build] Fix test and subproject builds

This commit is contained in:
Herman S.
2025-10-31 09:24:11 +09:00
parent f343f22404
commit dcc7ccce8d
10 changed files with 72 additions and 5 deletions
+1
View File
@@ -40,6 +40,7 @@ project("xenia-app")
"XBYAK_NO_OP_NAMES",
"XBYAK_ENABLE_OMITTED_OPERAND",
})
apu_transitive_deps()
local_platform_files()
files({
"../base/main_init_"..platform_suffix..".cc",
+1
View File
@@ -27,6 +27,7 @@ project("xenia-cpu-ppc-tests")
"imgui",
"mspack",
})
apu_transitive_deps()
-- Qt is required because xenia-kernel now uses Qt for achievements dialog
filter("platforms:Linux")
local qt_dir = os.getenv("QT_DIR")
+4
View File
@@ -6,6 +6,7 @@ test_suite("xenia-cpu-tests", project_root, ".", {
"capstone",
"fmt",
"imgui",
"xenia-apu", -- Explicitly link xenia-apu (transitively required by xenia-kernel)
"xenia-base",
"xenia-core",
"xenia-cpu",
@@ -26,3 +27,6 @@ test_suite("xenia-cpu-tests", project_root, ".", {
}
},
})
-- xenia-kernel links to xenia-apu, which needs SDL on Linux
apu_transitive_deps()
+3 -1
View File
@@ -54,9 +54,10 @@ if enableMiscSubprojects then
"snappy",
"xxhash",
})
apu_transitive_deps()
files({
"d3d12_trace_viewer_main.cc",
"../../ui/windowed_app_main_"..platform_suffix..".cc",
"../../ui/windowed_app_main_qt.cc",
})
-- Only create the .user file if it doesn't already exist.
local user_file = project_root.."/build/xenia-gpu-d3d12-trace-viewer.vcxproj.user"
@@ -107,6 +108,7 @@ if enableMiscSubprojects then
"snappy",
"xxhash",
})
apu_transitive_deps()
files({
"d3d12_trace_dump_main.cc",
"../../base/console_app_main_"..platform_suffix..".cc",
+3 -1
View File
@@ -67,13 +67,14 @@ if enableMiscSubprojects then
"snappy",
"xxhash",
})
apu_transitive_deps()
includedirs({
project_root.."/third_party/Vulkan-Headers/include",
project_root.."/third_party/glslang", -- For glslang SPIRV headers
})
files({
"vulkan_trace_viewer_main.cc",
"../../ui/windowed_app_main_"..platform_suffix..".cc",
"../../ui/windowed_app_main_qt.cc",
})
filter("architecture:x86_64")
@@ -133,6 +134,7 @@ if enableMiscSubprojects then
"snappy",
"xxhash",
})
apu_transitive_deps()
includedirs({
project_root.."/third_party/Vulkan-Headers/include",
project_root.."/third_party/glslang", -- For glslang SPIRV headers
+24 -1
View File
@@ -24,16 +24,39 @@ if enableMiscSubprojects then
links({
"fmt",
"imgui",
"xenia-apu",
"xenia-base",
"xenia-core",
"xenia-gpu",
"xenia-hid",
"xenia-hid-skylander",
"xenia-kernel", -- Required by xenia-hid
"xenia-patcher",
"xenia-ui",
"xenia-ui-d3d12",
"xenia-vfs",
})
links({
"aes_128",
"capstone",
"dxbc",
"glslang-spirv",
"mspack",
"snappy",
"xxhash",
})
apu_transitive_deps()
files({
"../window_demo.cc",
"d3d12_window_demo.cc",
project_root.."/src/xenia/ui/windowed_app_main_"..platform_suffix..".cc",
project_root.."/src/xenia/ui/windowed_app_main_qt.cc",
})
resincludedirs({
project_root,
})
filter("architecture:x86_64")
links({
"xenia-cpu-backend-x64",
})
end
+24 -1
View File
@@ -49,22 +49,45 @@ if enableMiscSubprojects then
links({
"fmt",
"imgui",
"xenia-apu",
"xenia-base",
"xenia-core",
"xenia-gpu",
"xenia-hid",
"xenia-hid-skylander",
"xenia-kernel", -- Required by xenia-hid
"xenia-patcher",
"xenia-ui",
"xenia-ui-vulkan",
"xenia-vfs",
})
links({
"aes_128",
"capstone",
"dxbc",
"glslang-spirv",
"mspack",
"snappy",
"xxhash",
})
apu_transitive_deps()
includedirs({
project_root.."/third_party/Vulkan-Headers/include",
})
files({
"../window_demo.cc",
"vulkan_window_demo.cc",
project_root.."/src/xenia/ui/windowed_app_main_"..platform_suffix..".cc",
project_root.."/src/xenia/ui/windowed_app_main_qt.cc",
})
resincludedirs({
project_root,
})
filter("architecture:x86_64")
links({
"xenia-cpu-backend-x64",
})
filter("platforms:Linux")
links({
"X11",
+1
View File
@@ -1,5 +1,6 @@
require("vstudio")
include("scripts/apu_deps.lua")
include("scripts/build_paths.lua")
include("scripts/force_compile_as_c.lua")
include("scripts/force_compile_as_cc.lua")
+11
View File
@@ -0,0 +1,11 @@
-- Helper function to add APU transitive dependencies
-- Call this after linking to xenia-apu to ensure all transitive dependencies are included
-- On Linux, xenia-apu's AudioMediaPlayer directly instantiates SDLAudioDriver,
-- so consumers must link xenia-apu-sdl (which in turn brings in xenia-helper-sdl and SDL2)
function apu_transitive_deps()
filter("platforms:Linux")
links({
"xenia-apu-sdl", -- Contains SDLAudioDriver used by AudioMediaPlayer
})
filter({})
end
-1
View File
@@ -13,7 +13,6 @@ NOT_SINGLE_LIBRARY_FILTER = table.translate(
function single_library_windowed_app_kind()
filter(SINGLE_LIBRARY_FILTER);
kind("StaticLib");
wholelib("On");
filter(NOT_SINGLE_LIBRARY_FILTER);
kind("WindowedApp");
filter({});