[Build] Convert build system to raw cmake and remove premake layer
This commit is contained in:
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",
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user