[Build] Convert build system to raw cmake and remove premake layer
This commit is contained in:
49
src/xenia/CMakeLists.txt
Normal file
49
src/xenia/CMakeLists.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
# src/xenia/CMakeLists.txt - Master file for all xenia modules.
|
||||
|
||||
# xenia-core (this directory's own sources)
|
||||
add_library(xenia-core STATIC)
|
||||
file(GLOB _core_sources "${CMAKE_CURRENT_SOURCE_DIR}/*.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cc"
|
||||
)
|
||||
target_sources(xenia-core PRIVATE ${_core_sources})
|
||||
target_link_libraries(xenia-core PUBLIC fmt xenia-base)
|
||||
xe_target_defaults(xenia-core)
|
||||
|
||||
# All subdirectories
|
||||
add_subdirectory(base)
|
||||
add_subdirectory(cpu)
|
||||
add_subdirectory(cpu/backend/x64)
|
||||
add_subdirectory(apu)
|
||||
add_subdirectory(apu/nop)
|
||||
add_subdirectory(gpu)
|
||||
add_subdirectory(gpu/null)
|
||||
add_subdirectory(gpu/vulkan)
|
||||
add_subdirectory(hid)
|
||||
add_subdirectory(hid/nop)
|
||||
add_subdirectory(hid/skylander)
|
||||
add_subdirectory(kernel)
|
||||
add_subdirectory(patcher)
|
||||
add_subdirectory(ui)
|
||||
add_subdirectory(ui/vulkan)
|
||||
add_subdirectory(vfs)
|
||||
add_subdirectory(debug/ui)
|
||||
add_subdirectory(app/discord)
|
||||
add_subdirectory(app)
|
||||
|
||||
# SDL-based modules (not Android)
|
||||
add_subdirectory(apu/sdl)
|
||||
add_subdirectory(helper/sdl)
|
||||
add_subdirectory(hid/sdl)
|
||||
|
||||
# Platform-conditional modules
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_subdirectory(apu/alsa)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(apu/xaudio2)
|
||||
add_subdirectory(gpu/d3d12)
|
||||
add_subdirectory(hid/winkey)
|
||||
add_subdirectory(hid/xinput)
|
||||
add_subdirectory(ui/d3d12)
|
||||
endif()
|
||||
115
src/xenia/app/CMakeLists.txt
Normal file
115
src/xenia/app/CMakeLists.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
# src/xenia/app/CMakeLists.txt - Main xenia_canary executable.
|
||||
|
||||
if(WIN32)
|
||||
add_executable(xenia-app WIN32)
|
||||
else()
|
||||
add_executable(xenia-app)
|
||||
endif()
|
||||
|
||||
set_target_properties(xenia-app PROPERTIES OUTPUT_NAME "xenia_canary")
|
||||
|
||||
# Main source
|
||||
target_sources(xenia-app PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xenia_main.cc
|
||||
)
|
||||
|
||||
# Other app sources (emulator_window, profile_dialogs, etc.)
|
||||
xe_platform_sources(xenia-app ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Platform-specific entry points
|
||||
if(WIN32)
|
||||
target_sources(xenia-app PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/main_init_win.cc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_win.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/main_resources.rc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/app_win32.manifest
|
||||
)
|
||||
# main_init_win.cc needs SSE2 only (not AVX)
|
||||
set_source_files_properties(
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/main_init_win.cc
|
||||
PROPERTIES COMPILE_OPTIONS "/arch:SSE2"
|
||||
)
|
||||
else()
|
||||
target_sources(xenia-app PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/main_init_posix.cc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_posix.cc
|
||||
)
|
||||
if(NOT MSVC)
|
||||
set_source_files_properties(
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/main_init_posix.cc
|
||||
PROPERTIES COMPILE_OPTIONS "-msse2;-mno-avx"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(xenia-app PRIVATE
|
||||
XBYAK_NO_OP_NAMES
|
||||
XBYAK_ENABLE_OMITTED_OPERAND
|
||||
)
|
||||
|
||||
# Core libraries (all platforms)
|
||||
target_link_libraries(xenia-app PRIVATE
|
||||
xenia-apu
|
||||
xenia-apu-nop
|
||||
xenia-base
|
||||
xenia-core
|
||||
xenia-cpu
|
||||
xenia-gpu
|
||||
xenia-gpu-null
|
||||
xenia-gpu-vulkan
|
||||
xenia-hid
|
||||
xenia-hid-nop
|
||||
xenia-kernel
|
||||
xenia-patcher
|
||||
xenia-ui
|
||||
xenia-ui-vulkan
|
||||
xenia-vfs
|
||||
# Third-party
|
||||
aes_128
|
||||
capstone
|
||||
fmt
|
||||
dxbc
|
||||
discord-rpc
|
||||
glslang-spirv
|
||||
imgui
|
||||
libavcodec
|
||||
libavutil
|
||||
mspack
|
||||
snappy
|
||||
xxhash
|
||||
)
|
||||
|
||||
# Non-Android specific (always true for Windows/Linux)
|
||||
target_link_libraries(xenia-app PRIVATE
|
||||
xenia-app-discord
|
||||
xenia-apu-sdl
|
||||
xenia-debug-ui
|
||||
xenia-helper-sdl
|
||||
xenia-hid-sdl
|
||||
)
|
||||
|
||||
# x64 backend
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-app PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
|
||||
# Platform-specific libraries
|
||||
if(WIN32)
|
||||
target_link_libraries(xenia-app PRIVATE
|
||||
xenia-apu-xaudio2
|
||||
xenia-gpu-d3d12
|
||||
xenia-hid-winkey
|
||||
xenia-hid-xinput
|
||||
xenia-ui-d3d12
|
||||
)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(xenia-app PRIVATE
|
||||
xenia-apu-alsa
|
||||
X11
|
||||
xcb
|
||||
X11-xcb
|
||||
SDL2
|
||||
)
|
||||
endif()
|
||||
|
||||
xe_target_defaults(xenia-app)
|
||||
9
src/xenia/app/discord/CMakeLists.txt
Normal file
9
src/xenia/app/discord/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
add_library(xenia-app-discord STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/discord_presence.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/discord_presence.h
|
||||
)
|
||||
target_include_directories(xenia-app-discord PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/discord-rpc/src
|
||||
)
|
||||
target_link_libraries(xenia-app-discord PUBLIC discord-rpc)
|
||||
xe_target_defaults(xenia-app-discord)
|
||||
@@ -1,18 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-app-discord")
|
||||
uuid("d14c0885-22d2-40de-ab28-7b234ef2b949")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"discord-rpc"
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/discord-rpc/src"
|
||||
})
|
||||
files({
|
||||
"discord_presence.cc",
|
||||
"discord_presence.h"
|
||||
})
|
||||
@@ -1,133 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-app")
|
||||
uuid("d7e98620-d007-4ad8-9dbd-b47c8853a17f")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-null",
|
||||
"xenia-gpu-vulkan",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-kernel",
|
||||
"xenia-patcher",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
"xenia-vfs",
|
||||
})
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"fmt",
|
||||
"dxbc",
|
||||
"discord-rpc",
|
||||
"glslang-spirv",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"mspack",
|
||||
"snappy",
|
||||
"xxhash",
|
||||
})
|
||||
defines({
|
||||
"XBYAK_NO_OP_NAMES",
|
||||
"XBYAK_ENABLE_OMITTED_OPERAND",
|
||||
})
|
||||
local_platform_files()
|
||||
files({
|
||||
"../base/main_init_"..platform_suffix..".cc",
|
||||
"../ui/windowed_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
|
||||
resincludedirs({
|
||||
project_root,
|
||||
})
|
||||
|
||||
filter(SINGLE_LIBRARY_FILTER)
|
||||
-- Unified library containing all apps as StaticLibs, not just the main
|
||||
-- emulator windowed app.
|
||||
kind("SharedLib")
|
||||
if enableMiscSubprojects then
|
||||
links({
|
||||
"xenia-gpu-vulkan-trace-viewer",
|
||||
"xenia-hid-demo",
|
||||
"xenia-ui-window-vulkan-demo",
|
||||
})
|
||||
end
|
||||
filter(NOT_SINGLE_LIBRARY_FILTER)
|
||||
kind("WindowedApp")
|
||||
|
||||
-- `targetname` is broken if building from Gradle, works only for toggling the
|
||||
-- `lib` prefix, as Gradle uses LOCAL_MODULE_FILENAME, not a derivative of
|
||||
-- LOCAL_MODULE, to specify the targets to build when executing ndk-build.
|
||||
filter("platforms:not Android-*")
|
||||
targetname("xenia_canary")
|
||||
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
|
||||
-- TODO(Triang3l): The emulator itself on Android.
|
||||
filter("platforms:not Android-*")
|
||||
files({
|
||||
"xenia_main.cc",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
files({
|
||||
"main_resources.rc",
|
||||
})
|
||||
|
||||
filter({"architecture:x86_64", "files:../base/main_init_"..platform_suffix..".cc"})
|
||||
vectorextensions("SSE2") -- Disable AVX for main_init_win.cc so our AVX check doesn't use AVX instructions.
|
||||
|
||||
filter("platforms:not Android-*")
|
||||
links({
|
||||
"xenia-app-discord",
|
||||
"xenia-apu-sdl",
|
||||
-- TODO(Triang3l): CPU debugger on Android.
|
||||
"xenia-debug-ui",
|
||||
"xenia-helper-sdl",
|
||||
"xenia-hid-sdl",
|
||||
})
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"xenia-apu-alsa",
|
||||
"X11",
|
||||
"xcb",
|
||||
"X11-xcb",
|
||||
"SDL2",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
links({
|
||||
"xenia-apu-xaudio2",
|
||||
"xenia-gpu-d3d12",
|
||||
"xenia-hid-winkey",
|
||||
"xenia-hid-xinput",
|
||||
"xenia-ui-d3d12",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
filter({"platforms:Windows", SINGLE_LIBRARY_FILTER})
|
||||
links({
|
||||
"xenia-gpu-d3d12-trace-viewer",
|
||||
"xenia-ui-window-d3d12-demo",
|
||||
})
|
||||
end
|
||||
|
||||
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)
|
||||
end
|
||||
8
src/xenia/apu/CMakeLists.txt
Normal file
8
src/xenia/apu/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
add_library(xenia-apu STATIC)
|
||||
xe_platform_sources(xenia-apu ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(xenia-apu PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/FFmpeg
|
||||
${PROJECT_SOURCE_DIR}/third_party/ffmpeg-xenia
|
||||
)
|
||||
target_link_libraries(xenia-apu PUBLIC libavcodec libavutil libavformat xenia-base)
|
||||
xe_target_defaults(xenia-apu)
|
||||
7
src/xenia/apu/alsa/CMakeLists.txt
Normal file
7
src/xenia/apu/alsa/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
add_library(xenia-apu-alsa STATIC)
|
||||
xe_platform_sources(xenia-apu-alsa ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-apu-alsa PUBLIC xenia-apu xenia-base)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(xenia-apu-alsa PRIVATE asound pthread)
|
||||
endif()
|
||||
xe_target_defaults(xenia-apu-alsa)
|
||||
@@ -1,18 +0,0 @@
|
||||
group("src")
|
||||
project("xenia-apu-alsa")
|
||||
uuid("8c2e1340-f847-4f9a-8b2e-5d8c1b7a8f9e")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-base",
|
||||
})
|
||||
defines({
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"asound",
|
||||
"pthread",
|
||||
})
|
||||
4
src/xenia/apu/nop/CMakeLists.txt
Normal file
4
src/xenia/apu/nop/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-apu-nop STATIC)
|
||||
xe_platform_sources(xenia-apu-nop ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-apu-nop PUBLIC xenia-base xenia-apu)
|
||||
xe_target_defaults(xenia-apu-nop)
|
||||
@@ -1,13 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-apu-nop")
|
||||
uuid("f37dbf3a-d200-4cc0-83f0-f801b1bdd862")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-apu",
|
||||
})
|
||||
local_platform_files()
|
||||
@@ -1,19 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-apu")
|
||||
uuid("f4df01f0-50e4-4c67-8f54-61660696cc79")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"libavformat",
|
||||
"xenia-base",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/FFmpeg",
|
||||
project_root.."/third_party/ffmpeg-xenia",
|
||||
})
|
||||
local_platform_files()
|
||||
4
src/xenia/apu/sdl/CMakeLists.txt
Normal file
4
src/xenia/apu/sdl/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-apu-sdl STATIC)
|
||||
xe_platform_sources(xenia-apu-sdl ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-apu-sdl PUBLIC xenia-apu xenia-base xenia-helper-sdl SDL2)
|
||||
xe_target_defaults(xenia-apu-sdl)
|
||||
@@ -1,16 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-apu-sdl")
|
||||
uuid("153b4e8b-813a-40e6-9366-4b51abc73c45")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-base",
|
||||
"xenia-helper-sdl",
|
||||
"SDL2",
|
||||
})
|
||||
local_platform_files()
|
||||
sdl2_include()
|
||||
4
src/xenia/apu/xaudio2/CMakeLists.txt
Normal file
4
src/xenia/apu/xaudio2/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-apu-xaudio2 STATIC)
|
||||
xe_platform_sources(xenia-apu-xaudio2 ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-apu-xaudio2 PUBLIC xenia-base xenia-apu)
|
||||
xe_target_defaults(xenia-apu-xaudio2)
|
||||
@@ -1,13 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-apu-xaudio2")
|
||||
uuid("7a54a497-24d9-4c0e-a013-8507a04231f9")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-apu",
|
||||
})
|
||||
local_platform_files()
|
||||
17
src/xenia/base/CMakeLists.txt
Normal file
17
src/xenia/base/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
add_library(xenia-base STATIC)
|
||||
xe_platform_sources(xenia-base ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Exclude console_app_main and main_init files
|
||||
file(GLOB _base_exclude "${CMAKE_CURRENT_SOURCE_DIR}/console_app_main_*.cc"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/main_init_*.cc"
|
||||
)
|
||||
get_target_property(_base_srcs xenia-base SOURCES)
|
||||
if(_base_exclude AND _base_srcs)
|
||||
list(REMOVE_ITEM _base_srcs ${_base_exclude})
|
||||
set_target_properties(xenia-base PROPERTIES SOURCES "${_base_srcs}")
|
||||
endif()
|
||||
target_link_libraries(xenia-base PUBLIC fmt)
|
||||
xe_target_defaults(xenia-base)
|
||||
|
||||
if(XENIA_BUILD_TESTS)
|
||||
add_subdirectory(testing)
|
||||
endif()
|
||||
@@ -1,22 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
project("xenia-base")
|
||||
uuid("aeadaf22-2b20-4941-b05f-a802d5679c11")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
})
|
||||
local_platform_files()
|
||||
removefiles({
|
||||
"console_app_main_*.cc",
|
||||
"main_init_*.cc",
|
||||
})
|
||||
files({
|
||||
"debug_visualizers.natvis",
|
||||
})
|
||||
|
||||
if enableTests then
|
||||
include("testing")
|
||||
end
|
||||
3
src/xenia/base/testing/CMakeLists.txt
Normal file
3
src/xenia/base/testing/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
xe_test_suite(xenia-base-tests ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
LINKS fmt xenia-base
|
||||
)
|
||||
@@ -1,9 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
test_suite("xenia-base-tests", project_root, ".", {
|
||||
links = {
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
},
|
||||
})
|
||||
17
src/xenia/cpu/CMakeLists.txt
Normal file
17
src/xenia/cpu/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
add_library(xenia-cpu STATIC)
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR}/backend)
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR}/compiler)
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR}/compiler/passes)
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR}/hir)
|
||||
xe_platform_sources(xenia-cpu ${CMAKE_CURRENT_SOURCE_DIR}/ppc)
|
||||
target_include_directories(xenia-cpu PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/llvm/include
|
||||
)
|
||||
target_link_libraries(xenia-cpu PUBLIC xenia-base mspack)
|
||||
xe_target_defaults(xenia-cpu)
|
||||
|
||||
if(XENIA_BUILD_TESTS)
|
||||
add_subdirectory(testing)
|
||||
add_subdirectory(ppc/testing)
|
||||
endif()
|
||||
18
src/xenia/cpu/backend/x64/CMakeLists.txt
Normal file
18
src/xenia/cpu/backend/x64/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
add_library(xenia-cpu-backend-x64 STATIC)
|
||||
xe_platform_sources(xenia-cpu-backend-x64 ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(xenia-cpu-backend-x64 PRIVATE
|
||||
CAPSTONE_X86_ATT_DISABLE
|
||||
CAPSTONE_HAS_X86
|
||||
CAPSTONE_USE_SYS_DYN_MEM
|
||||
XBYAK_NO_OP_NAMES
|
||||
XBYAK_ENABLE_OMITTED_OPERAND
|
||||
)
|
||||
# Optional VTune support
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/third_party/vtune")
|
||||
target_compile_definitions(xenia-cpu-backend-x64 PRIVATE ENABLE_VTUNE=1)
|
||||
endif()
|
||||
target_include_directories(xenia-cpu-backend-x64 PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/capstone/include
|
||||
)
|
||||
target_link_libraries(xenia-cpu-backend-x64 PUBLIC capstone fmt xenia-base xenia-cpu)
|
||||
xe_target_defaults(xenia-cpu-backend-x64)
|
||||
@@ -1,30 +0,0 @@
|
||||
project_root = "../../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-cpu-backend-x64")
|
||||
uuid("7d8d5dce-4696-4197-952a-09506f725afe")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"capstone",
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
"xenia-cpu",
|
||||
})
|
||||
defines({
|
||||
"CAPSTONE_X86_ATT_DISABLE",
|
||||
"CAPSTONE_HAS_X86",
|
||||
"CAPSTONE_USE_SYS_DYN_MEM",
|
||||
"XBYAK_NO_OP_NAMES",
|
||||
"XBYAK_ENABLE_OMITTED_OPERAND",
|
||||
})
|
||||
-- Enable VTune, if it's installed.
|
||||
if os.isdir(project_root.."/third_party/vtune") then
|
||||
defines { "ENABLE_VTUNE=1" }
|
||||
end
|
||||
|
||||
includedirs({
|
||||
project_root.."/third_party/capstone/include",
|
||||
})
|
||||
local_platform_files()
|
||||
37
src/xenia/cpu/ppc/testing/CMakeLists.txt
Normal file
37
src/xenia/cpu/ppc/testing/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
if(NOT XENIA_BUILD_TESTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(xenia-cpu-ppc-tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ppc_testing_main.cc
|
||||
)
|
||||
|
||||
# Add platform-specific console app main
|
||||
if(WIN32)
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_posix.cc)
|
||||
endif()
|
||||
|
||||
# Add .s files but exclude from build (they're test data)
|
||||
file(GLOB _ppc_asm "${CMAKE_CURRENT_SOURCE_DIR}/*.s")
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE ${_ppc_asm})
|
||||
set_source_files_properties(${_ppc_asm} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
target_link_libraries(xenia-cpu-ppc-tests PRIVATE
|
||||
xenia-apu xenia-apu-nop
|
||||
xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-null
|
||||
xenia-hid xenia-hid-nop
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-vfs
|
||||
capstone fmt imgui mspack
|
||||
)
|
||||
|
||||
# x64 backend
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-cpu-ppc-tests PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
|
||||
xe_target_defaults(xenia-cpu-ppc-tests)
|
||||
@@ -1,85 +0,0 @@
|
||||
project_root = "../../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("tests")
|
||||
project("xenia-cpu-ppc-tests")
|
||||
uuid("2a57d5ac-4024-4c49-9cd3-aa3a603c2ef8")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-null",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-kernel",
|
||||
"xenia-patcher",
|
||||
"xenia-ui",
|
||||
"xenia-vfs",
|
||||
})
|
||||
links({
|
||||
"capstone",
|
||||
"fmt",
|
||||
"imgui",
|
||||
"mspack",
|
||||
})
|
||||
files({
|
||||
"ppc_testing_main.cc",
|
||||
"../../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
files({
|
||||
"*.s",
|
||||
})
|
||||
filter("files:*.s")
|
||||
flags({
|
||||
"ExcludeFromBuild",
|
||||
})
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
filter("platforms:Windows")
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-testing.txt",
|
||||
})
|
||||
|
||||
filter({})
|
||||
|
||||
if ARCH == "ppc64" or ARCH == "powerpc64" then
|
||||
|
||||
project("xenia-cpu-ppc-nativetests")
|
||||
uuid("E381E8EE-65CD-4D5E-9223-D9C03B2CE78C")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
})
|
||||
files({
|
||||
"ppc_testing_native_main.cc",
|
||||
"../../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
files({
|
||||
"instr_*.s",
|
||||
"seq_*.s",
|
||||
})
|
||||
filter("files:instr_*.s", "files:seq_*.s")
|
||||
flags({
|
||||
"ExcludeFromBuild",
|
||||
})
|
||||
filter({})
|
||||
buildoptions({
|
||||
"-Wa,-mregnames", -- Tell GAS to accept register names.
|
||||
})
|
||||
|
||||
files({
|
||||
"ppc_testing_native_thunks.s",
|
||||
})
|
||||
|
||||
end
|
||||
@@ -1,27 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-cpu")
|
||||
uuid("0109c91e-5a04-41ab-9168-0d5187d11298")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"mspack",
|
||||
})
|
||||
|
||||
includedirs({
|
||||
project_root.."/third_party/llvm/include",
|
||||
})
|
||||
local_platform_files()
|
||||
local_platform_files("backend")
|
||||
local_platform_files("compiler")
|
||||
local_platform_files("compiler/passes")
|
||||
local_platform_files("hir")
|
||||
local_platform_files("ppc")
|
||||
|
||||
if enableTests then
|
||||
include("testing")
|
||||
include("ppc/testing")
|
||||
end
|
||||
7
src/xenia/cpu/testing/CMakeLists.txt
Normal file
7
src/xenia/cpu/testing/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
xe_test_suite(xenia-cpu-tests ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
LINKS
|
||||
capstone fmt imgui
|
||||
xenia-base xenia-core xenia-cpu xenia-gpu
|
||||
xenia-hid-skylander xenia-kernel xenia-ui xenia-patcher
|
||||
$<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},x86_64>:xenia-cpu-backend-x64>
|
||||
)
|
||||
@@ -1,28 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
test_suite("xenia-cpu-tests", project_root, ".", {
|
||||
links = {
|
||||
"capstone",
|
||||
"fmt",
|
||||
"imgui",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-hid-skylander",
|
||||
|
||||
-- TODO(benvanik): cut these dependencies?
|
||||
"xenia-kernel",
|
||||
"xenia-ui", -- needed by xenia-base
|
||||
"xenia-patcher",
|
||||
},
|
||||
filtered_links = {
|
||||
{
|
||||
filter = 'architecture:x86_64',
|
||||
links = {
|
||||
"xenia-cpu-backend-x64",
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
4
src/xenia/debug/ui/CMakeLists.txt
Normal file
4
src/xenia/debug/ui/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-debug-ui STATIC)
|
||||
xe_platform_sources(xenia-debug-ui ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-debug-ui PUBLIC imgui xenia-base xenia-cpu xenia-ui)
|
||||
xe_target_defaults(xenia-debug-ui)
|
||||
@@ -1,15 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-debug-ui")
|
||||
uuid("9193a274-f4c2-4746-bd85-93fcfc5c3e38")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"imgui",
|
||||
"xenia-base",
|
||||
"xenia-cpu",
|
||||
"xenia-ui",
|
||||
})
|
||||
local_platform_files()
|
||||
30
src/xenia/gpu/CMakeLists.txt
Normal file
30
src/xenia/gpu/CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
add_library(xenia-gpu STATIC)
|
||||
xe_platform_sources(xenia-gpu ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(xenia-gpu PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-gpu PUBLIC dxbc fmt glslang-spirv snappy xxhash xenia-base xenia-ui)
|
||||
xe_target_defaults(xenia-gpu)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# Shader compiler tool
|
||||
add_executable(xenia-gpu-shader-compiler
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shader_compiler_main.cc
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(xenia-gpu-shader-compiler PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-gpu-shader-compiler PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_posix.cc)
|
||||
endif()
|
||||
target_include_directories(xenia-gpu-shader-compiler PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-gpu-shader-compiler PRIVATE
|
||||
dxbc fmt glslang-spirv snappy xenia-base xenia-gpu xenia-ui xenia-ui-vulkan
|
||||
)
|
||||
xe_target_defaults(xenia-gpu-shader-compiler)
|
||||
endif()
|
||||
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
|
||||
7
src/xenia/gpu/null/CMakeLists.txt
Normal file
7
src/xenia/gpu/null/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
add_library(xenia-gpu-null STATIC)
|
||||
xe_platform_sources(xenia-gpu-null ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(xenia-gpu-null PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
)
|
||||
target_link_libraries(xenia-gpu-null PUBLIC xenia-base xenia-gpu xenia-ui xenia-ui-vulkan xxhash)
|
||||
xe_target_defaults(xenia-gpu-null)
|
||||
@@ -1,19 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-null")
|
||||
uuid("42FCA0B3-4C20-4532-95E9-07D297013BE4")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
"xxhash",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
})
|
||||
local_platform_files()
|
||||
@@ -1,60 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu")
|
||||
uuid("0e8d3370-e4b1-4b05-a2e8-39ebbcdf9b17")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"dxbc",
|
||||
"fmt",
|
||||
"glslang-spirv",
|
||||
"snappy",
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
"xxhash",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
project_root.."/third_party/glslang", -- For glslang SPIRV headers
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
if enableMiscSubprojects then
|
||||
group("src")
|
||||
project("xenia-gpu-shader-compiler")
|
||||
uuid("ad76d3e4-4c62-439b-a0f6-f83fcf0e83c5")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"dxbc",
|
||||
"fmt",
|
||||
"glslang-spirv",
|
||||
"snappy",
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
project_root.."/third_party/glslang", -- For glslang SPIRV headers
|
||||
})
|
||||
files({
|
||||
"shader_compiler_main.cc",
|
||||
"../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- Only create the .user file if it doesn't already exist.
|
||||
local user_file = project_root.."/build/xenia-gpu-shader-compiler.vcxproj.user"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-shader-compiler.txt",
|
||||
})
|
||||
end
|
||||
filter({})
|
||||
end
|
||||
71
src/xenia/gpu/vulkan/CMakeLists.txt
Normal file
71
src/xenia/gpu/vulkan/CMakeLists.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
add_library(xenia-gpu-vulkan STATIC)
|
||||
xe_platform_sources(xenia-gpu-vulkan ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Include shader bytecode headers
|
||||
file(GLOB _vk_shader_headers "${CMAKE_CURRENT_SOURCE_DIR}/../shaders/bytecode/vulkan_spirv/*.h"
|
||||
)
|
||||
target_sources(xenia-gpu-vulkan PRIVATE ${_vk_shader_headers})
|
||||
target_include_directories(xenia-gpu-vulkan PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-gpu-vulkan PUBLIC
|
||||
fmt glslang-spirv xxhash xenia-base xenia-gpu xenia-ui xenia-ui-vulkan
|
||||
)
|
||||
xe_target_defaults(xenia-gpu-vulkan)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# Vulkan trace viewer
|
||||
add_executable(xenia-gpu-vulkan-trace-viewer
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vulkan_trace_viewer_main.cc
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(xenia-gpu-vulkan-trace-viewer PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-gpu-vulkan-trace-viewer PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_posix.cc)
|
||||
endif()
|
||||
target_include_directories(xenia-gpu-vulkan-trace-viewer PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-gpu-vulkan-trace-viewer PRIVATE
|
||||
xenia-apu xenia-apu-nop xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-vulkan xenia-hid xenia-hid-nop xenia-hid-skylander
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-ui-vulkan xenia-vfs
|
||||
aes_128 capstone fmt glslang-spirv imgui libavcodec libavutil mspack snappy xxhash
|
||||
)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-gpu-vulkan-trace-viewer PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(xenia-gpu-vulkan-trace-viewer PRIVATE X11 xcb X11-xcb)
|
||||
endif()
|
||||
xe_target_defaults(xenia-gpu-vulkan-trace-viewer)
|
||||
|
||||
# Vulkan trace dump
|
||||
add_executable(xenia-gpu-vulkan-trace-dump
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vulkan_trace_dump_main.cc
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(xenia-gpu-vulkan-trace-dump PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-gpu-vulkan-trace-dump PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_posix.cc)
|
||||
endif()
|
||||
target_include_directories(xenia-gpu-vulkan-trace-dump PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-gpu-vulkan-trace-dump PRIVATE
|
||||
xenia-apu xenia-apu-nop xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-vulkan xenia-hid xenia-hid-nop xenia-hid-skylander
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-ui-vulkan xenia-vfs
|
||||
aes_128 capstone fmt glslang-spirv imgui libavcodec libavutil mspack snappy xxhash
|
||||
)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-gpu-vulkan-trace-dump PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
xe_target_defaults(xenia-gpu-vulkan-trace-dump)
|
||||
endif()
|
||||
@@ -1,159 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-vulkan")
|
||||
uuid("717590b4-f579-4162-8f23-0624e87d6cca")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"glslang-spirv",
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
"xxhash",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
project_root.."/third_party/glslang", -- For glslang SPIRV headers
|
||||
})
|
||||
local_platform_files()
|
||||
files({
|
||||
"../shaders/bytecode/vulkan_spirv/*.h",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
group("src")
|
||||
project("xenia-gpu-vulkan-trace-viewer")
|
||||
uuid("86a1dddc-a26a-4885-8c55-cf745225d93e")
|
||||
single_library_windowed_app_kind()
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-vulkan",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-hid-skylander",
|
||||
"xenia-kernel",
|
||||
"xenia-patcher",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
"xenia-vfs",
|
||||
})
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"fmt",
|
||||
"glslang-spirv",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"mspack",
|
||||
"snappy",
|
||||
"xxhash",
|
||||
})
|
||||
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",
|
||||
})
|
||||
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"X11",
|
||||
"xcb",
|
||||
"X11-xcb",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- Only create the .user file if it doesn't already exist.
|
||||
local user_file = project_root.."/build/xenia-gpu-vulkan-trace-viewer.vcxproj.user"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-viewer.txt",
|
||||
})
|
||||
end
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-vulkan-trace-dump")
|
||||
uuid("0dd0dd1c-b321-494d-ab9a-6c062f0c65cc")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-vulkan",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-hid-skylander",
|
||||
"xenia-kernel",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
"xenia-vfs",
|
||||
"xenia-patcher",
|
||||
})
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"fmt",
|
||||
"glslang-spirv",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
"libavutil",
|
||||
"mspack",
|
||||
"snappy",
|
||||
"xxhash",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
project_root.."/third_party/glslang", -- For glslang SPIRV headers
|
||||
})
|
||||
files({
|
||||
"vulkan_trace_dump_main.cc",
|
||||
"../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"X11",
|
||||
"xcb",
|
||||
"X11-xcb",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- Only create the .user file if it doesn't already exist.
|
||||
local user_file = project_root.."/build/xenia-gpu-vulkan-trace-dump.vcxproj.user"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-dump.txt",
|
||||
})
|
||||
end
|
||||
end
|
||||
4
src/xenia/helper/sdl/CMakeLists.txt
Normal file
4
src/xenia/helper/sdl/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-helper-sdl STATIC)
|
||||
xe_platform_sources(xenia-helper-sdl ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-helper-sdl PUBLIC SDL2)
|
||||
xe_target_defaults(xenia-helper-sdl)
|
||||
@@ -1,13 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-helper-sdl")
|
||||
uuid("84b00ad3-fba3-4561-96c9-1f9993b14c9c")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"SDL2",
|
||||
})
|
||||
local_platform_files()
|
||||
sdl2_include()
|
||||
11
src/xenia/hid/CMakeLists.txt
Normal file
11
src/xenia/hid/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
add_library(xenia-hid STATIC)
|
||||
xe_platform_sources(xenia-hid ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Exclude demo files
|
||||
file(GLOB _hid_demo "${CMAKE_CURRENT_SOURCE_DIR}/*_demo.cc")
|
||||
get_target_property(_hid_srcs xenia-hid SOURCES)
|
||||
if(_hid_demo AND _hid_srcs)
|
||||
list(REMOVE_ITEM _hid_srcs ${_hid_demo})
|
||||
set_target_properties(xenia-hid PROPERTIES SOURCES "${_hid_srcs}")
|
||||
endif()
|
||||
target_link_libraries(xenia-hid PUBLIC xenia-base xenia-hid-skylander)
|
||||
xe_target_defaults(xenia-hid)
|
||||
4
src/xenia/hid/nop/CMakeLists.txt
Normal file
4
src/xenia/hid/nop/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-hid-nop STATIC)
|
||||
xe_platform_sources(xenia-hid-nop ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-hid-nop PUBLIC xenia-base xenia-hid)
|
||||
xe_target_defaults(xenia-hid-nop)
|
||||
@@ -1,13 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid-nop")
|
||||
uuid("887b6f26-b0c1-43c1-a013-a37e7b9634fd")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-hid",
|
||||
})
|
||||
local_platform_files()
|
||||
@@ -1,16 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid")
|
||||
uuid("88a4ef38-c550-430f-8c22-8ded4e4ef601")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-hid-skylander",
|
||||
})
|
||||
local_platform_files()
|
||||
removefiles({
|
||||
"*_demo.cc",
|
||||
})
|
||||
4
src/xenia/hid/sdl/CMakeLists.txt
Normal file
4
src/xenia/hid/sdl/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-hid-sdl STATIC)
|
||||
xe_platform_sources(xenia-hid-sdl ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-hid-sdl PUBLIC xenia-base xenia-hid xenia-ui SDL2)
|
||||
xe_target_defaults(xenia-hid-sdl)
|
||||
@@ -1,16 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid-sdl")
|
||||
uuid("44f5b9a1-00f8-4825-acf1-5c93f26eba9b")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-hid",
|
||||
"xenia-ui",
|
||||
"SDL2",
|
||||
})
|
||||
local_platform_files()
|
||||
sdl2_include()
|
||||
14
src/xenia/hid/skylander/CMakeLists.txt
Normal file
14
src/xenia/hid/skylander/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
add_library(xenia-hid-skylander STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_portal.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_portal.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_emulated.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_emulated.cc
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(xenia-hid-skylander PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_hardware.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skylander_hardware.cc
|
||||
)
|
||||
target_link_libraries(xenia-hid-skylander PUBLIC libusb)
|
||||
endif()
|
||||
xe_target_defaults(xenia-hid-skylander)
|
||||
@@ -1,23 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid-skylander")
|
||||
uuid("ddc114da-a279-4868-8b20-53108599bd78")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
files({
|
||||
"skylander_portal.h",
|
||||
"skylander_portal.cc",
|
||||
"skylander_emulated.h",
|
||||
"skylander_emulated.cc"
|
||||
})
|
||||
|
||||
filter({"platforms:Windows"})
|
||||
links({
|
||||
"libusb",
|
||||
})
|
||||
files({
|
||||
"skylander_hardware.h",
|
||||
"skylander_hardware.cc"
|
||||
})
|
||||
4
src/xenia/hid/winkey/CMakeLists.txt
Normal file
4
src/xenia/hid/winkey/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-hid-winkey STATIC)
|
||||
xe_platform_sources(xenia-hid-winkey ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-hid-winkey PUBLIC xenia-base xenia-hid xenia-ui)
|
||||
xe_target_defaults(xenia-hid-winkey)
|
||||
@@ -1,14 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid-winkey")
|
||||
uuid("fd16e19a-6219-4ab7-b95a-7c78523c50c3")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-hid",
|
||||
"xenia-ui",
|
||||
})
|
||||
local_platform_files()
|
||||
4
src/xenia/hid/xinput/CMakeLists.txt
Normal file
4
src/xenia/hid/xinput/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-hid-xinput STATIC)
|
||||
xe_platform_sources(xenia-hid-xinput ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(xenia-hid-xinput PUBLIC xenia-base xenia-hid)
|
||||
xe_target_defaults(xenia-hid-xinput)
|
||||
@@ -1,13 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-hid-xinput")
|
||||
uuid("3d49e251-07a7-40ae-9bc6-aae984c85568")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-hid",
|
||||
})
|
||||
local_platform_files()
|
||||
23
src/xenia/kernel/CMakeLists.txt
Normal file
23
src/xenia/kernel/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
add_library(xenia-kernel STATIC)
|
||||
xe_platform_sources(xenia-kernel ${CMAKE_CURRENT_SOURCE_DIR} RECURSIVE)
|
||||
target_compile_definitions(xenia-kernel PRIVATE
|
||||
X86_FEATURES
|
||||
X86_HAVE_XSAVE_INTRIN
|
||||
X86_SSSE3
|
||||
X86_SSE42
|
||||
WITH_GZFILEOP
|
||||
)
|
||||
if(WIN32)
|
||||
target_compile_definitions(xenia-kernel PRIVATE
|
||||
X86_SSE2
|
||||
X86_AVX2
|
||||
X86_AVX512
|
||||
X86_AVX512VNNI
|
||||
X86_PCLMULQDQ_CRC
|
||||
X86_VPCLMULQDQ_CRC
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(xenia-kernel PUBLIC
|
||||
aes_128 fmt zlib-ng pugixml xenia-apu xenia-base xenia-cpu xenia-hid xenia-vfs
|
||||
)
|
||||
xe_target_defaults(xenia-kernel)
|
||||
@@ -1,40 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-kernel")
|
||||
uuid("ae185c4a-1c4f-4503-9892-328e549e871a")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"aes_128",
|
||||
"fmt",
|
||||
"zlib-ng",
|
||||
"pugixml",
|
||||
"xenia-apu",
|
||||
"xenia-base",
|
||||
"xenia-cpu",
|
||||
"xenia-hid",
|
||||
"xenia-vfs",
|
||||
})
|
||||
defines({
|
||||
"X86_FEATURES",
|
||||
"X86_HAVE_XSAVE_INTRIN",
|
||||
"X86_SSSE3",
|
||||
"X86_SSE42",
|
||||
"WITH_GZFILEOP",
|
||||
})
|
||||
if os.istarget("windows") then
|
||||
defines({
|
||||
"X86_SSE2",
|
||||
"X86_AVX2",
|
||||
"X86_AVX512",
|
||||
"X86_AVX512VNNI",
|
||||
"X86_PCLMULQDQ_CRC",
|
||||
"X86_VPCLMULQDQ_CRC",
|
||||
})
|
||||
end
|
||||
recursive_platform_files()
|
||||
files({
|
||||
"debug_visualizers.natvis",
|
||||
})
|
||||
4
src/xenia/patcher/CMakeLists.txt
Normal file
4
src/xenia/patcher/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_library(xenia-patcher STATIC)
|
||||
xe_platform_sources(xenia-patcher ${CMAKE_CURRENT_SOURCE_DIR} RECURSIVE)
|
||||
target_link_libraries(xenia-patcher PUBLIC xenia-base)
|
||||
xe_target_defaults(xenia-patcher)
|
||||
@@ -1,12 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-patcher")
|
||||
uuid("e1c75f76-9e7b-48f6-b17e-dbd20f7a1592")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base"
|
||||
})
|
||||
recursive_platform_files()
|
||||
@@ -1,16 +0,0 @@
|
||||
project_root = "../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-core")
|
||||
uuid("970f7892-f19a-4bf5-8795-478c51757bec")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
})
|
||||
files({
|
||||
"*.h",
|
||||
"*.cc",
|
||||
})
|
||||
18
src/xenia/ui/CMakeLists.txt
Normal file
18
src/xenia/ui/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
add_library(xenia-ui STATIC)
|
||||
xe_platform_sources(xenia-ui ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Exclude demo and windowed_app_main files
|
||||
file(GLOB _ui_exclude "${CMAKE_CURRENT_SOURCE_DIR}/*_demo.cc"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/windowed_app_main_*.cc"
|
||||
)
|
||||
get_target_property(_ui_srcs xenia-ui SOURCES)
|
||||
if(_ui_exclude AND _ui_srcs)
|
||||
list(REMOVE_ITEM _ui_srcs ${_ui_exclude})
|
||||
set_target_properties(xenia-ui PROPERTIES SOURCES "${_ui_srcs}")
|
||||
endif()
|
||||
target_link_libraries(xenia-ui PUBLIC xenia-base)
|
||||
if(WIN32)
|
||||
target_link_libraries(xenia-ui PRIVATE dwmapi dxgi winmm)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(xenia-ui PRIVATE xcb X11 X11-xcb fontconfig ${GTK3_LIBRARIES})
|
||||
endif()
|
||||
xe_target_defaults(xenia-ui)
|
||||
21
src/xenia/ui/d3d12/CMakeLists.txt
Normal file
21
src/xenia/ui/d3d12/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
add_library(xenia-ui-d3d12 STATIC)
|
||||
xe_platform_sources(xenia-ui-d3d12 ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Include shader bytecode headers
|
||||
file(GLOB _d3d12_ui_shader_headers "${CMAKE_CURRENT_SOURCE_DIR}/../shaders/bytecode/d3d12_5_1/*.h"
|
||||
)
|
||||
target_sources(xenia-ui-d3d12 PRIVATE ${_d3d12_ui_shader_headers})
|
||||
target_link_libraries(xenia-ui-d3d12 PUBLIC xenia-base xenia-ui)
|
||||
xe_target_defaults(xenia-ui-d3d12)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# D3D12 window demo
|
||||
add_executable(xenia-ui-window-d3d12-demo WIN32
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../window_demo.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/d3d12_window_demo.cc
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_win.cc
|
||||
)
|
||||
target_link_libraries(xenia-ui-window-d3d12-demo PRIVATE
|
||||
fmt imgui xenia-base xenia-ui xenia-ui-d3d12
|
||||
)
|
||||
xe_target_defaults(xenia-ui-window-d3d12-demo)
|
||||
endif()
|
||||
@@ -1,39 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-ui-d3d12")
|
||||
uuid("f93dc1a8-600f-43e7-b0fc-ae3eefbe836b")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
})
|
||||
local_platform_files()
|
||||
files({
|
||||
"../shaders/bytecode/d3d12_5_1/*.h",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
group("demos")
|
||||
project("xenia-ui-window-d3d12-demo")
|
||||
uuid("3b9686a7-0f04-4e17-8b00-aeb78ae1107c")
|
||||
single_library_windowed_app_kind()
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"imgui",
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
"xenia-ui-d3d12",
|
||||
})
|
||||
files({
|
||||
"../window_demo.cc",
|
||||
"d3d12_window_demo.cc",
|
||||
project_root.."/src/xenia/ui/windowed_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
resincludedirs({
|
||||
project_root,
|
||||
})
|
||||
end
|
||||
@@ -1,36 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-ui")
|
||||
uuid("d0407c25-b0ea-40dc-846c-82c46fbd9fa2")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
})
|
||||
local_platform_files()
|
||||
removefiles({
|
||||
"*_demo.cc",
|
||||
"windowed_app_main_*.cc",
|
||||
})
|
||||
if os.istarget("android") then
|
||||
filter("platforms:Android-*")
|
||||
-- Exports JNI functions.
|
||||
wholelib("On")
|
||||
end
|
||||
|
||||
filter("platforms:Windows")
|
||||
links({
|
||||
"dwmapi",
|
||||
"dxgi",
|
||||
"winmm",
|
||||
})
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"xcb",
|
||||
"X11",
|
||||
"X11-xcb",
|
||||
"fontconfig"
|
||||
})
|
||||
40
src/xenia/ui/vulkan/CMakeLists.txt
Normal file
40
src/xenia/ui/vulkan/CMakeLists.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
add_library(xenia-ui-vulkan STATIC)
|
||||
xe_platform_sources(xenia-ui-vulkan ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
xe_platform_sources(xenia-ui-vulkan ${CMAKE_CURRENT_SOURCE_DIR}/functions)
|
||||
# Include shader bytecode headers
|
||||
file(GLOB _vk_ui_shader_headers "${CMAKE_CURRENT_SOURCE_DIR}/../shaders/bytecode/vulkan_spirv/*.h"
|
||||
)
|
||||
target_sources(xenia-ui-vulkan PRIVATE ${_vk_ui_shader_headers})
|
||||
target_include_directories(xenia-ui-vulkan PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
${PROJECT_SOURCE_DIR}/third_party/glslang
|
||||
)
|
||||
target_link_libraries(xenia-ui-vulkan PUBLIC xenia-base xenia-ui)
|
||||
xe_target_defaults(xenia-ui-vulkan)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# Vulkan window demo
|
||||
add_executable(xenia-ui-window-vulkan-demo)
|
||||
if(WIN32)
|
||||
set_target_properties(xenia-ui-window-vulkan-demo PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||
target_sources(xenia-ui-window-vulkan-demo PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-ui-window-vulkan-demo PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/ui/windowed_app_main_posix.cc)
|
||||
endif()
|
||||
target_sources(xenia-ui-window-vulkan-demo PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../window_demo.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vulkan_window_demo.cc
|
||||
)
|
||||
target_include_directories(xenia-ui-window-vulkan-demo PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
)
|
||||
target_link_libraries(xenia-ui-window-vulkan-demo PRIVATE
|
||||
fmt imgui xenia-base xenia-ui xenia-ui-vulkan
|
||||
)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(xenia-ui-window-vulkan-demo PRIVATE X11 xcb X11-xcb)
|
||||
endif()
|
||||
xe_target_defaults(xenia-ui-window-vulkan-demo)
|
||||
endif()
|
||||
@@ -1,54 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-ui-vulkan")
|
||||
uuid("4933d81e-1c2c-4d5d-b104-3c0eb9dc2f00")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/Vulkan-Headers/include",
|
||||
project_root.."/third_party/glslang", -- For glslang SPIRV headers
|
||||
})
|
||||
local_platform_files()
|
||||
local_platform_files("functions")
|
||||
files({
|
||||
"../shaders/bytecode/vulkan_spirv/*.h",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
group("demos")
|
||||
project("xenia-ui-window-vulkan-demo")
|
||||
uuid("97598f13-3177-454c-8e58-c59e2b6ede27")
|
||||
single_library_windowed_app_kind()
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"imgui",
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
})
|
||||
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",
|
||||
})
|
||||
resincludedirs({
|
||||
project_root,
|
||||
})
|
||||
|
||||
filter("platforms:Linux")
|
||||
links({
|
||||
"X11",
|
||||
"xcb",
|
||||
"X11-xcb",
|
||||
})
|
||||
end
|
||||
31
src/xenia/vfs/CMakeLists.txt
Normal file
31
src/xenia/vfs/CMakeLists.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
add_library(xenia-vfs STATIC)
|
||||
xe_platform_sources(xenia-vfs ${CMAKE_CURRENT_SOURCE_DIR} RECURSIVE)
|
||||
# Exclude vfs_dump.cc
|
||||
file(GLOB _vfs_dump "${CMAKE_CURRENT_SOURCE_DIR}/vfs_dump.cc")
|
||||
get_target_property(_vfs_srcs xenia-vfs SOURCES)
|
||||
if(_vfs_dump AND _vfs_srcs)
|
||||
list(REMOVE_ITEM _vfs_srcs ${_vfs_dump})
|
||||
set_target_properties(xenia-vfs PROPERTIES SOURCES "${_vfs_srcs}")
|
||||
endif()
|
||||
target_link_libraries(xenia-vfs PUBLIC xenia-base zstd zarchive)
|
||||
xe_target_defaults(xenia-vfs)
|
||||
|
||||
if(XENIA_BUILD_MISC)
|
||||
# VFS dump tool
|
||||
add_executable(xenia-vfs-dump
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vfs_dump.cc
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(xenia-vfs-dump PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-vfs-dump PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_posix.cc)
|
||||
endif()
|
||||
target_link_libraries(xenia-vfs-dump PRIVATE fmt xenia-base xenia-vfs)
|
||||
xe_target_defaults(xenia-vfs-dump)
|
||||
endif()
|
||||
|
||||
if(XENIA_BUILD_TESTS)
|
||||
add_subdirectory(testing)
|
||||
endif()
|
||||
@@ -1,42 +0,0 @@
|
||||
project_root = "../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("src")
|
||||
project("xenia-vfs")
|
||||
uuid("395c8abd-4dc9-46ed-af7a-c2b9b68a3a98")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"zstd",
|
||||
"zarchive"
|
||||
})
|
||||
|
||||
recursive_platform_files()
|
||||
removefiles({
|
||||
"vfs_dump.cc",
|
||||
})
|
||||
|
||||
if enableMiscSubprojects then
|
||||
project("xenia-vfs-dump")
|
||||
uuid("2EF270C7-41A8-4D0E-ACC5-59693A9CCE32")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
"xenia-vfs",
|
||||
})
|
||||
|
||||
files({
|
||||
"vfs_dump.cc",
|
||||
project_root.."/src/xenia/base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
resincludedirs({
|
||||
project_root,
|
||||
})
|
||||
end
|
||||
|
||||
if enableTests then
|
||||
include("testing")
|
||||
end
|
||||
3
src/xenia/vfs/testing/CMakeLists.txt
Normal file
3
src/xenia/vfs/testing/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
xe_test_suite(xenia-vfs-tests ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
LINKS xenia-vfs
|
||||
)
|
||||
@@ -1,8 +0,0 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
test_suite("xenia-vfs-tests", project_root, ".", {
|
||||
links = {
|
||||
"xenia-vfs",
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user