Skip to content

Commit 03e4fb6

Browse files
use public header
1 parent a31feb3 commit 03e4fb6

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ set(RUST_ROOT ${LIVEKIT_ROOT_DIR}/client-sdk-rust)
171171

172172
# Cargo features for the Rust FFI build.
173173
set(LIVEKIT_CARGO_FEATURES "")
174+
set(LIVEKIT_CAPTURE_ENABLED 0)
174175
if(LIVEKIT_ENABLE_CAPTURE)
175176
set(LIVEKIT_CARGO_FEATURES "capture")
177+
set(LIVEKIT_CAPTURE_ENABLED 1)
176178
endif()
177179

178180
set(GIT_COMMIT "unknown")

‎build.h.in‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
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"
@@ -18,4 +19,4 @@
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

‎include/livekit/capture_source.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
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"

‎src/tests/CMakeLists.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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

‎src/tests/integration/test_capture_source.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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() \

0 commit comments

Comments
 (0)