[Build] Convert build system to raw cmake and remove premake layer
This commit is contained in:
44
src/xenia/gpu/d3d12/CMakeLists.txt
Normal file
44
src/xenia/gpu/d3d12/CMakeLists.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
add_library(xenia-gpu-d3d12 STATIC)
|
||||
xe_platform_sources(xenia-gpu-d3d12 ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Include shader bytecode headers
|
||||
file(GLOB _d3d12_shader_headers "${CMAKE_CURRENT_SOURCE_DIR}/../shaders/bytecode/d3d12_5_1/*.h"
|
||||
)
|
||||
target_sources(xenia-gpu-d3d12 PRIVATE ${_d3d12_shader_headers})
|
||||
target_link_libraries(xenia-gpu-d3d12 PUBLIC
|
||||
fmt xxhash xenia-base xenia-gpu xenia-ui xenia-ui-d3d12
|
||||
)
|
||||
xe_target_defaults(xenia-gpu-d3d12)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# D3D12 trace viewer
|
||||
add_executable(xenia-gpu-d3d12-trace-viewer WIN32
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/d3d12_trace_viewer_main.cc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_win.cc
|
||||
)
|
||||
target_link_libraries(xenia-gpu-d3d12-trace-viewer PRIVATE
|
||||
xenia-apu xenia-apu-nop xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-d3d12 xenia-hid xenia-hid-nop xenia-hid-skylander
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-ui-d3d12 xenia-vfs
|
||||
aes_128 capstone dxbc fmt imgui libavcodec libavutil mspack snappy xxhash
|
||||
)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-gpu-d3d12-trace-viewer PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
xe_target_defaults(xenia-gpu-d3d12-trace-viewer)
|
||||
|
||||
# D3D12 trace dump
|
||||
add_executable(xenia-gpu-d3d12-trace-dump
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/d3d12_trace_dump_main.cc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc
|
||||
)
|
||||
target_link_libraries(xenia-gpu-d3d12-trace-dump PRIVATE
|
||||
xenia-apu xenia-apu-nop xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-d3d12 xenia-hid xenia-hid-nop xenia-hid-skylander
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-ui-d3d12 xenia-vfs
|
||||
aes_128 capstone dxbc fmt imgui libavcodec libavutil mspack snappy xxhash
|
||||
)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-gpu-d3d12-trace-dump PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
xe_target_defaults(xenia-gpu-d3d12-trace-dump)
|
||||
endif()
|
||||
@@ -1,128 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-d3d12")
|
||||
uuid("c057eae4-e7bb-4113-9a69-1fe07b735c49")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
"xenia-ui",
|
||||
"xenia-ui-d3d12",
|
||||
"xxhash",
|
||||
})
|
||||
local_platform_files()
|
||||
files({
|
||||
"../shaders/bytecode/d3d12_5_1/*.h",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
group("src")
|
||||
project("xenia-gpu-d3d12-trace-viewer")
|
||||
uuid("7b5b9fcb-7bf1-43ff-a774-d4c41c8706be")
|
||||
single_library_windowed_app_kind()
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-d3d12",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-hid-skylander",
|
||||
"xenia-kernel",
|
||||
"xenia-patcher",
|
||||
"xenia-ui",
|
||||
"xenia-ui-d3d12",
|
||||
"xenia-vfs",
|
||||
})
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"dxbc",
|
||||
"fmt",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"mspack",
|
||||
"snappy",
|
||||
"xxhash",
|
||||
})
|
||||
files({
|
||||
"d3d12_trace_viewer_main.cc",
|
||||
"../../ui/windowed_app_main_"..platform_suffix..".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"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-viewer.txt",
|
||||
})
|
||||
end
|
||||
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-d3d12-trace-dump")
|
||||
uuid("686b859c-0046-44c4-a02c-41fc3fb75698")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-d3d12",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-hid-skylander",
|
||||
"xenia-kernel",
|
||||
"xenia-ui",
|
||||
"xenia-ui-d3d12",
|
||||
"xenia-vfs",
|
||||
"xenia-patcher",
|
||||
})
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"dxbc",
|
||||
"fmt",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"mspack",
|
||||
"snappy",
|
||||
"xxhash",
|
||||
})
|
||||
files({
|
||||
"d3d12_trace_dump_main.cc",
|
||||
"../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
-- Only create the .user file if it doesn't already exist.
|
||||
local user_file = project_root.."/build/xenia-gpu-d3d12-trace-dump.vcxproj.user"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-dump.txt",
|
||||
})
|
||||
end
|
||||
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
end
|
||||
Reference in New Issue
Block a user