Files
yaze/src/app/core/core_library.cmake
scawful eec9f84fb0 refactor: Update CMake configurations and enhance TODO management features
- Replaced `${CMAKE_SOURCE_DIR}` with `${PROJECT_SOURCE_DIR}` in CMake files for consistent path handling.
- Introduced new `todo_commands` and `todo_manager` components to manage TODO items, including creation, listing, updating, and deletion functionalities.
- Added detailed implementations for handling TODO commands in the CLI, improving task management capabilities.
- Enhanced the `TodoManager` class to support persistence and execution planning for TODO items.
- Updated CMake configurations to include new source files related to TODO management, ensuring proper integration into the build system.
2025-10-05 00:19:57 -04:00

137 lines
4.1 KiB
CMake

set(
YAZE_APP_CORE_SRC
app/core/controller.cc
app/emu/emulator.cc
app/core/project.cc
app/core/window.cc
app/core/asar_wrapper.cc
)
if (WIN32 OR MINGW OR (UNIX AND NOT APPLE))
list(APPEND YAZE_APP_CORE_SRC
app/core/platform/font_loader.cc
)
endif()
if(APPLE)
list(APPEND YAZE_APP_CORE_SRC
app/core/platform/file_dialog.mm
app/core/platform/app_delegate.mm
app/core/platform/font_loader.cc
app/core/platform/font_loader.mm
)
find_library(COCOA_LIBRARY Cocoa)
if(NOT COCOA_LIBRARY)
message(FATAL_ERROR "Cocoa not found")
endif()
set(CMAKE_EXE_LINKER_FLAGS "-framework ServiceManagement -framework Foundation -framework Cocoa")
endif()
# ==============================================================================
# Yaze Core Library
# ==============================================================================
# This library contains core application functionality:
# - ROM management
# - Project management
# - Controller/Window management
# - Asar wrapper for assembly
# - Platform-specific utilities (file dialogs, fonts, clipboard)
# - Widget state capture for testing
# - Emulator interface
#
# Dependencies: yaze_util, yaze_gfx, asar, SDL2
# ==============================================================================
add_library(yaze_core_lib STATIC
app/rom.cc
${YAZE_APP_CORE_SRC}
)
target_include_directories(yaze_core_lib PUBLIC
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/app
${CMAKE_SOURCE_DIR}/src/lib
${CMAKE_SOURCE_DIR}/src/lib/imgui
${CMAKE_SOURCE_DIR}/src/lib/asar/src
${CMAKE_SOURCE_DIR}/src/lib/asar/src/asar
${CMAKE_SOURCE_DIR}/src/lib/asar/src/asar-dll-bindings/c
${CMAKE_SOURCE_DIR}/incl
${SDL2_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
)
target_link_libraries(yaze_core_lib PUBLIC
yaze_util
yaze_gfx
yaze_common
ImGui
asar-static
${ABSL_TARGETS}
${SDL_TARGETS}
${CMAKE_DL_LIBS}
)
target_sources(yaze_core_lib PRIVATE
${CMAKE_SOURCE_DIR}/src/cli/service/testing/test_workflow_generator.cc
)
if(YAZE_WITH_GRPC)
target_include_directories(yaze_core_lib PRIVATE
${CMAKE_SOURCE_DIR}/third_party/json/include)
target_compile_definitions(yaze_core_lib PRIVATE YAZE_WITH_JSON)
# Add proto definitions for test harness and ROM service
target_add_protobuf(yaze_core_lib
${PROJECT_SOURCE_DIR}/src/app/core/proto/imgui_test_harness.proto)
target_add_protobuf(yaze_core_lib
${PROJECT_SOURCE_DIR}/protos/rom_service.proto)
# Add test harness implementation
target_sources(yaze_core_lib PRIVATE
${CMAKE_SOURCE_DIR}/src/app/core/service/imgui_test_harness_service.cc
${CMAKE_SOURCE_DIR}/src/app/core/service/imgui_test_harness_service.h
${CMAKE_SOURCE_DIR}/src/app/core/service/screenshot_utils.cc
${CMAKE_SOURCE_DIR}/src/app/core/service/screenshot_utils.h
${CMAKE_SOURCE_DIR}/src/app/core/service/widget_discovery_service.cc
${CMAKE_SOURCE_DIR}/src/app/core/service/widget_discovery_service.h
${CMAKE_SOURCE_DIR}/src/app/core/testing/test_recorder.cc
${CMAKE_SOURCE_DIR}/src/app/core/testing/test_recorder.h
${CMAKE_SOURCE_DIR}/src/app/core/testing/test_script_parser.cc
${CMAKE_SOURCE_DIR}/src/app/core/testing/test_script_parser.h
# Add unified gRPC server
${CMAKE_SOURCE_DIR}/src/app/core/service/unified_grpc_server.cc
${CMAKE_SOURCE_DIR}/src/app/core/service/unified_grpc_server.h
)
target_link_libraries(yaze_core_lib PUBLIC
grpc++
grpc++_reflection
libprotobuf
)
message(STATUS " - gRPC test harness + ROM service enabled")
endif()
# Platform-specific libraries
if(APPLE)
target_link_libraries(yaze_core_lib PUBLIC ${COCOA_LIBRARY})
endif()
set_target_properties(yaze_core_lib PROPERTIES
POSITION_INDEPENDENT_CODE ON
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
# Platform-specific compile definitions
if(UNIX AND NOT APPLE)
target_compile_definitions(yaze_core_lib PRIVATE linux stricmp=strcasecmp)
elseif(APPLE)
target_compile_definitions(yaze_core_lib PRIVATE MACOS)
elseif(WIN32)
target_compile_definitions(yaze_core_lib PRIVATE WINDOWS)
endif()
message(STATUS "✓ yaze_core_lib library configured")