build: refresh toolchain and dependency wiring

This commit is contained in:
scawful
2025-12-22 14:45:31 -05:00
parent 7b72b2e3d4
commit df866b3f7f
18 changed files with 160 additions and 67 deletions

View File

@@ -109,8 +109,9 @@ if(APPLE)
)
if(YAZE_ENABLE_JSON)
target_include_directories(yaze_app_objcxx PUBLIC
${CMAKE_SOURCE_DIR}/ext/json/include)
if(TARGET nlohmann_json::nlohmann_json)
target_link_libraries(yaze_app_objcxx PUBLIC nlohmann_json::nlohmann_json)
endif()
target_compile_definitions(yaze_app_objcxx PUBLIC YAZE_WITH_JSON)
endif()
@@ -121,7 +122,7 @@ if(APPLE)
if(NOT COCOA_LIBRARY)
message(FATAL_ERROR "Cocoa not found")
endif()
set(CMAKE_EXE_LINKER_FLAGS "-framework ServiceManagement -framework Foundation -framework Cocoa")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework ServiceManagement -framework Foundation -framework Cocoa")
endif()
# Create the application core library
@@ -139,13 +140,13 @@ target_include_directories(yaze_app_core_lib PUBLIC
${CMAKE_SOURCE_DIR}/src/app
${CMAKE_SOURCE_DIR}/ext
${CMAKE_SOURCE_DIR}/ext/imgui
${CMAKE_SOURCE_DIR}/ext/json/include
${CMAKE_SOURCE_DIR}/incl
${SDL2_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
)
if(YAZE_ENABLE_JSON)
target_link_libraries(yaze_app_core_lib PUBLIC nlohmann_json::nlohmann_json)
target_compile_definitions(yaze_app_core_lib PUBLIC YAZE_WITH_JSON)
endif()
@@ -174,8 +175,6 @@ endif()
# gRPC Services (Optional)
if(YAZE_WITH_GRPC)
target_include_directories(yaze_app_core_lib PRIVATE
${CMAKE_SOURCE_DIR}/ext/json/include)
target_compile_definitions(yaze_app_core_lib PRIVATE YAZE_WITH_JSON)
# Link to consolidated gRPC support library
target_link_libraries(yaze_app_core_lib PUBLIC yaze_grpc_support)

View File

@@ -112,6 +112,7 @@ set(
app/editor/layout_designer/widget_code_generator.cc
app/editor/layout_designer/theme_properties.cc
app/editor/layout_designer/yaze_widgets.cc
yaze.cc
)
# Agent UI Theme is always needed (used by dungeon editor, etc.)
@@ -193,9 +194,6 @@ endif()
# Note: yaze_test_support linking is deferred to test.cmake to ensure proper ordering
if(YAZE_ENABLE_JSON)
target_include_directories(yaze_editor PUBLIC
${CMAKE_SOURCE_DIR}/ext/json/include)
if(TARGET nlohmann_json::nlohmann_json)
target_link_libraries(yaze_editor PUBLIC nlohmann_json::nlohmann_json)
endif()

View File

@@ -57,8 +57,6 @@ target_include_directories(yaze_net PUBLIC
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/ext
${CMAKE_SOURCE_DIR}/ext/imgui
${CMAKE_SOURCE_DIR}/ext/json/include
${CMAKE_SOURCE_DIR}/ext/httplib
${PROJECT_BINARY_DIR}
)
@@ -69,6 +67,10 @@ target_link_libraries(yaze_net PUBLIC
${YAZE_SDL2_TARGETS}
)
if(NOT EMSCRIPTEN AND YAZE_HTTPLIB_TARGETS)
target_link_libraries(yaze_net PUBLIC ${YAZE_HTTPLIB_TARGETS})
endif()
# Add Emscripten-specific flags for WASM builds
if(EMSCRIPTEN)
# Enable Fetch API for HTTP requests
@@ -87,7 +89,6 @@ endif()
if(YAZE_ENABLE_JSON)
# Link nlohmann_json which provides the include directories automatically
target_link_libraries(yaze_net PUBLIC nlohmann_json::nlohmann_json)
target_include_directories(yaze_net PUBLIC ${CMAKE_SOURCE_DIR}/ext/httplib)
target_compile_definitions(yaze_net PUBLIC YAZE_WITH_JSON)
# Add threading support (cross-platform)

View File

@@ -58,8 +58,7 @@ target_link_libraries(yaze_grpc_support PUBLIC
# Add JSON support
if(YAZE_ENABLE_JSON)
target_include_directories(yaze_grpc_support PUBLIC
${CMAKE_SOURCE_DIR}/ext/json/include)
target_link_libraries(yaze_grpc_support PUBLIC nlohmann_json::nlohmann_json)
target_compile_definitions(yaze_grpc_support PUBLIC YAZE_WITH_JSON)
endif()

View File

@@ -45,8 +45,6 @@ target_link_libraries(yaze_test_support PUBLIC
# Add gRPC dependencies if test harness is enabled
if(YAZE_WITH_GRPC)
target_include_directories(yaze_test_support PRIVATE
${CMAKE_SOURCE_DIR}/ext/json/include)
target_compile_definitions(yaze_test_support PRIVATE YAZE_WITH_JSON)
# Link to consolidated gRPC support library
@@ -80,4 +78,4 @@ message(STATUS "✓ yaze_test_support library configured")
# Note: yaze_editor needs yaze_test_support for TestManager, but we can't link it here
# because this happens BEFORE yaze and yaze_emu are configured.
# Instead, each executable (yaze, yaze_emu) must explicitly link yaze_test_support
# in their respective .cmake files (app.cmake, emu.cmake).
# in their respective .cmake files (app.cmake, emu.cmake).