Currently, each module in Xenia is built as a static library (also called archive). On Linux, an archive only contains the object files for that module. So any depedency that module has must be specified by adding those other modules when linking the program, as the dependencies are resolved at that time.
80 lines
1.6 KiB
Lua
80 lines
1.6 KiB
Lua
project_root = "../../.."
|
|
include(project_root.."/tools/build")
|
|
|
|
group("src")
|
|
project("xenia-app")
|
|
uuid("d7e98620-d007-4ad8-9dbd-b47c8853a17f")
|
|
kind("WindowedApp")
|
|
targetname("xenia")
|
|
language("C++")
|
|
links({
|
|
"capstone",
|
|
"gflags",
|
|
"glslang-spirv",
|
|
"imgui",
|
|
"libavcodec",
|
|
"libavutil",
|
|
"snappy",
|
|
"spirv-tools",
|
|
"vulkan-loader",
|
|
"xenia-apu",
|
|
"xenia-apu-nop",
|
|
"xenia-base",
|
|
"xenia-core",
|
|
"xenia-cpu",
|
|
"xenia-cpu-backend-x64",
|
|
"xenia-debug-ui",
|
|
"xenia-gpu",
|
|
"xenia-gpu-gl4",
|
|
"xenia-gpu-null",
|
|
"xenia-gpu-vulkan",
|
|
"xenia-hid",
|
|
"xenia-hid-nop",
|
|
"xenia-kernel",
|
|
"xenia-ui",
|
|
"xenia-ui-gl",
|
|
"xenia-ui-spirv",
|
|
"xenia-ui-vulkan",
|
|
"xenia-vfs",
|
|
"xxhash",
|
|
})
|
|
flags({
|
|
"WinMain", -- Use WinMain instead of main.
|
|
})
|
|
defines({
|
|
})
|
|
includedirs({
|
|
project_root.."/third_party/gflags/src",
|
|
})
|
|
local_platform_files()
|
|
files({
|
|
"xenia_main.cc",
|
|
"../base/main_"..platform_suffix..".cc",
|
|
})
|
|
filter("platforms:Windows")
|
|
files({
|
|
"main_resources.rc",
|
|
})
|
|
resincludedirs({
|
|
project_root,
|
|
})
|
|
|
|
filter("platforms:Windows")
|
|
links({
|
|
"xenia-apu-xaudio2",
|
|
"xenia-hid-winkey",
|
|
"xenia-hid-xinput",
|
|
})
|
|
|
|
filter("platforms:Windows")
|
|
-- Only create the .user file if it doesn't already exist.
|
|
local user_file = project_root.."/build/xenia-app.vcxproj.user"
|
|
if not os.isfile(user_file) then
|
|
debugdir(project_root)
|
|
debugargs({
|
|
"--flagfile=scratch/flags.txt",
|
|
"2>&1",
|
|
"1>scratch/stdout.txt",
|
|
})
|
|
end
|