Checkpoint 2: integrate native Editor, MCP, gameplay builds and standalone export

This commit is contained in:
Emil
2026-09-18 03:40:15 +03:00
parent 5c6b24d34d
commit 999686a896
125 changed files with 16086 additions and 1714 deletions
+35 -2
View File
@@ -27,7 +27,7 @@ else()
endif()
include(cmake/Dependencies.cmake)
add_library(faset_core STATIC src/core/hash.cpp src/core/io.cpp)
add_library(faset_core STATIC src/core/hash.cpp src/core/io.cpp src/core/process.cpp)
target_include_directories(faset_core PUBLIC include)
target_link_libraries(faset_core PUBLIC nlohmann_json::nlohmann_json Threads::Threads)
target_compile_definitions(faset_core PUBLIC FASET_VERSION="${PROJECT_VERSION}")
@@ -50,7 +50,21 @@ endforeach()
if(FASET_BUILD_RENDERER AND EXISTS "${PROJECT_SOURCE_DIR}/cmake/Renderer.cmake")
include(cmake/Renderer.cmake)
endif()
foreach(module UI Editor Applications)
if(TARGET faset_gameplay AND EXISTS "${PROJECT_SOURCE_DIR}/cmake/Player.cmake")
include(cmake/Player.cmake)
endif()
if(TARGET faset_authoring AND EXISTS "${PROJECT_SOURCE_DIR}/cmake/EditorCommands.cmake")
include(cmake/EditorCommands.cmake)
endif()
if(TARGET faset_assets AND EXISTS "${PROJECT_SOURCE_DIR}/cmake/BuildService.cmake")
include(cmake/BuildService.cmake)
endif()
if(TARGET faset_editor_commands AND TARGET faset_build_service)
include(cmake/Plugins.cmake)
add_library(faset_editor_session STATIC src/editor/session.cpp)
target_link_libraries(faset_editor_session PUBLIC faset_editor_commands faset_build_service faset_assets faset_editor_plugins)
endif()
foreach(module UI EditorUI Editor Applications)
if(NOT FASET_BUILD_EDITOR)
continue()
endif()
@@ -59,8 +73,27 @@ foreach(module UI Editor Applications)
endif()
endforeach()
if(TARGET faset_editor_session)
add_executable(faset_editor apps/editor_main.cpp)
target_link_libraries(faset_editor PRIVATE faset_editor_session)
target_compile_definitions(faset_editor PRIVATE FASET_ENGINE_SOURCE="${PROJECT_SOURCE_DIR}")
if(BUILD_TESTING)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
add_test(NAME editor_mcp_stdio COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tests/mcp_stdio_test.py $<TARGET_FILE:faset_editor>)
set_tests_properties(editor_mcp_stdio PROPERTIES TIMEOUT 60)
endif()
if(TARGET faset_editor_ui)
target_link_libraries(faset_editor PRIVATE faset_editor_ui)
target_link_libraries(faset_editor PRIVATE faset_stb)
target_compile_definitions(faset_editor PRIVATE FASET_HAS_EDITOR_UI=1)
target_sources(faset_editor PRIVATE apps/editor_gui.cpp)
endif()
endif()
if(BUILD_TESTING)
add_executable(faset_core_tests tests/core_tests.cpp)
target_link_libraries(faset_core_tests PRIVATE faset_core)
add_test(NAME core COMMAND faset_core_tests)
endif()
include(cmake/Tutorials.cmake)