feat: Enhance modular build support and update Abseil integration for macOS

This commit is contained in:
scawful
2025-10-03 19:10:59 -04:00
parent c3eaace72c
commit c9f439207e
6 changed files with 59 additions and 23 deletions

View File

@@ -99,22 +99,21 @@ else()
endif()
if(YAZE_USE_MODULAR_BUILD)
target_link_libraries(yaze PRIVATE
yaze_util
yaze_gfx
yaze_gui
yaze_zelda3
yaze_core_lib
yaze_editor
)
set(_yaze_modular_links yaze_editor)
if(TARGET yaze_agent)
target_link_libraries(yaze PRIVATE yaze_agent)
list(APPEND _yaze_modular_links yaze_agent)
endif()
if(YAZE_BUILD_EMU AND NOT YAZE_WITH_GRPC AND TARGET yaze_emulator)
target_link_libraries(yaze PRIVATE yaze_emulator)
list(APPEND _yaze_modular_links yaze_emulator)
endif()
# Link once against the editor library and allow its PUBLIC dependencies
# (core, gfx, util, absl, etc.) to propagate transitively. This avoids
# duplicate static archives on the link line while keeping absl symbols
# available for main and other entry points.
target_link_libraries(yaze PRIVATE ${_yaze_modular_links})
else()
target_link_libraries(yaze PRIVATE yaze_core)
endif()

View File

@@ -35,6 +35,7 @@ target_link_libraries(yaze_core_lib PUBLIC
yaze_util
yaze_gfx
yaze_common
ImGui
asar-static
${ABSL_TARGETS}
${SDL_TARGETS}

View File

@@ -121,24 +121,14 @@ target_include_directories(
if(YAZE_USE_MODULAR_BUILD)
target_link_libraries(
z3ed PRIVATE
yaze_util
yaze_gfx
yaze_zelda3
yaze_core_lib
yaze_agent
yaze_core
ftxui::component
ftxui::screen
ftxui::dom
absl::flags
absl::flags_parse
)
else()
target_link_libraries(
z3ed PRIVATE
yaze_core
ftxui::component
ftxui::screen
ftxui::dom
absl::flags
absl::flags_parse
)