File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,8 +170,10 @@ set(RUST_ROOT ${LIVEKIT_ROOT_DIR}/client-sdk-rust)
170170
171171# Cargo features for the Rust FFI build.
172172set (LIVEKIT_CARGO_FEATURES "" )
173+ set (LIVEKIT_CAPTURE_ENABLED 0)
173174if (LIVEKIT_ENABLE_CAPTURE)
174175 set (LIVEKIT_CARGO_FEATURES "capture" )
176+ set (LIVEKIT_CAPTURE_ENABLED 1)
175177endif ()
176178
177179set (GIT_COMMIT "unknown" )
Original file line number Diff line number Diff line change 77// Version injected by CMake (CI should set it). Defaults to 0.0.0 for dev builds.
88#define LIVEKIT_BUILD_VERSION "@LIVEKIT_VERSION@"
99#define LIVEKIT_BUILD_FLAVOR "cpp"
10+ #define LIVEKIT_CAPTURE_ENABLED @LIVEKIT_CAPTURE_ENABLED@
1011
1112#ifdef DEBUG
1213#define LIVEKIT_BUILD_SUFFIX "-debug"
1819#define LIVEKIT_BUILD_DATE "@BUILD_DATE@"
1920#define LIVEKIT_BUILD_COMMIT "@GIT_COMMIT@"
2021
21- #define LIVEKIT_BUILD_VERSION_FULL LIVEKIT_BUILD_VERSION LIVEKIT_BUILD_SUFFIX
22+ #define LIVEKIT_BUILD_VERSION_FULL LIVEKIT_BUILD_VERSION LIVEKIT_BUILD_SUFFIX
Original file line number Diff line number Diff line change 2626#include < string>
2727#include < vector>
2828
29+ #include " livekit/build.h"
2930#include " livekit/ffi_handle.h"
3031#include " livekit/room_event_types.h"
3132#include " livekit/video_source.h"
Original file line number Diff line number Diff line change @@ -204,9 +204,6 @@ if(INTEGRATION_TEST_SOURCES)
204204 LIVEKIT_ROOT_DIR= "${LIVEKIT_ROOT_DIR} "
205205 SPDLOG_ACTIVE_LEVEL=${_SPDLOG_ACTIVE_LEVEL}
206206 $<$<PLATFORM_ID :Windows >:_USE_MATH_DEFINES >
207- # The FFI reports a missing capture feature only as a generic invalid
208- # handle, so the capture tests cannot detect it at runtime.
209- $<$<BOOL :${LIVEKIT_ENABLE_CAPTURE} >:LIVEKIT_TEST_CAPTURE_ENABLED >
210207 )
211208
212209 # Copy shared libraries to test executable directory
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ constexpr std::uint32_t kCaptureFramerateFps = 30;
5151// / Skips the calling test when the FFI library was built without the capture
5252// / feature. A feature-less FFI reports only a generic invalid handle, so this
5353// / has to be decided at compile time rather than sniffed from an error string.
54- #ifdef LIVEKIT_TEST_CAPTURE_ENABLED
54+ #if LIVEKIT_CAPTURE_ENABLED
5555#define SKIP_WITHOUT_CAPTURE_FEATURE () ((void )0 )
5656#else
5757#define SKIP_WITHOUT_CAPTURE_FEATURE () \
You can’t perform that action at this time.
0 commit comments