[Build] Convert build system to raw cmake and remove premake layer

This commit is contained in:
Herman S.
2026-03-04 15:28:01 +09:00
parent f1bfb9416d
commit 71c5702ee8
106 changed files with 1829 additions and 3249 deletions

View 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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
xe_test_suite(xenia-vfs-tests ${CMAKE_CURRENT_SOURCE_DIR}
LINKS xenia-vfs
)

View File

@@ -1,8 +0,0 @@
project_root = "../../../.."
include(project_root.."/tools/build")
test_suite("xenia-vfs-tests", project_root, ".", {
links = {
"xenia-vfs",
},
})