[Build] Convert build system to raw cmake and remove premake layer
This commit is contained in:
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