Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes the CMake configuration for the vendored spdlog dependency so that spdlog’s own install rules are enabled when fetched via FetchContent on macOS/Linux.
Changes:
- Enable
SPDLOG_INSTALLfor the vendored spdlog build (OFF→ON).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set(SPDLOG_BUILD_EXAMPLE OFF CACHE BOOL "" FORCE) | ||
| set(SPDLOG_BUILD_TESTS OFF CACHE BOOL "" FORCE) | ||
| set(SPDLOG_INSTALL OFF CACHE BOOL "" FORCE) | ||
| set(SPDLOG_INSTALL ON CACHE BOOL "" FORCE) |
There was a problem hiding this comment.
Setting SPDLOG_INSTALL to ON will make the vendored spdlog subproject participate in the parent install step (installing its headers/CMake package). This can be surprising when LiveKit is consumed via add_subdirectory and can also reintroduce the kind of subproject install/export issues you explicitly disabled for vendored protobuf/abseil (cmake/protobuf.cmake notes this to avoid export-set errors). Consider gating this with LIVEKIT_IS_TOPLEVEL (or introducing a LIVEKIT_INSTALL_DEPS option) so dependency installs only happen for the standalone SDK bundle use case.
| set(SPDLOG_INSTALL ON CACHE BOOL "" FORCE) | |
| if(LIVEKIT_IS_TOPLEVEL) | |
| # When building LiveKit as the top-level project, allow vendored spdlog to install | |
| set(SPDLOG_INSTALL ON CACHE BOOL "" FORCE) | |
| else() | |
| # When LiveKit is consumed as a subproject, avoid installing vendored spdlog | |
| set(SPDLOG_INSTALL OFF CACHE BOOL "" FORCE) | |
| endif() |
There was a problem hiding this comment.
I had been of the thought that we should package spdlog with our SW to enable our logging macros (very useful) out of the box. But do we think we should require applications to explicitly install and link their app against us + spdlog? curious on your experience here @xianshijing-lk
1e66fd0 to
3bdf79a
Compare
Building against release 0.3.2 causes error:
This MR adds a build against an external project in CI to test cmake linking. It depends on this workI brought in the github action client build commit into this MR to include the test of the fix!