From 2794df37ca87a5d7569d59229312290793bd2ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Mon, 22 Jun 2026 12:52:50 -0400 Subject: [PATCH] deps: don't unity-build Abseil; fix vendored wiiuse include Abseil's .cc files have file-scope statics (kAsciiToInt, kDigits, ...) that collide when unity-batched; disable unity for the in-tree Abseil build. wiiuse: add the vendored include whenever the bundled copy is built (keyed on WIIUSE_DIR) rather than on the system-libraries flag, so the graceful fallback also works when a system wiiuse is requested but absent. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01S5akSKFxSnxVz3RtLyU9QN --- cmake/deps/abseil.cmake | 3 +++ src/ossia_features.cmake | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/deps/abseil.cmake b/cmake/deps/abseil.cmake index b1979b71036..0f89f076d7c 100644 --- a/cmake/deps/abseil.cmake +++ b/cmake/deps/abseil.cmake @@ -9,6 +9,9 @@ if(NOT TARGET absl::strings) block() set(BUILD_SHARED_LIBS 0) set(BUILD_TESTING 0) + # Abseil's .cc files have file-scope statics (kAsciiToInt, ...) that clash + # when batched, so it must not be unity-built. + set(CMAKE_UNITY_BUILD OFF) set(ABSL_BUILD_TESTING OFF CACHE INTERNAL "") set(ABSL_PROPAGATE_CXX_STD ON CACHE INTERNAL "") # Treat Abseil's headers as system headers so that re2 (and ossia) do not diff --git a/src/ossia_features.cmake b/src/ossia_features.cmake index 01026db10cf..be16f23a5fd 100644 --- a/src/ossia_features.cmake +++ b/src/ossia_features.cmake @@ -140,8 +140,7 @@ endif() if(OSSIA_PROTOCOL_WIIMOTE) target_sources(ossia PRIVATE ${OSSIA_WIIMOTE_SRCS} ${OSSIA_WIIMOTE_HEADERS}) - ossia_use_system(use_sys wiiuse) - if(NOT use_sys) + if(WIIUSE_DIR) target_include_directories(ossia PRIVATE "${WIIUSE_DIR}/src") endif() target_link_libraries(ossia PRIVATE $)