-
Notifications
You must be signed in to change notification settings - Fork 21
Move all examples to cpp-example-collection #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| [submodule "client-sdk-rust"] | ||
| path = client-sdk-rust | ||
| url = https://github.com/livekit/client-sdk-rust | ||
| [submodule "cpp-example-collection"] | ||
| path = cpp-example-collection | ||
| url = https://github.com/livekit-examples/cpp-example-collection.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Copyright 2026 LiveKit, Inc. | ||
| # | ||
| # LiveKit examples integration helpers. | ||
|
|
||
| include_guard(GLOBAL) | ||
|
|
||
| function(livekit_configure_cpp_example_collection) | ||
| # Absolute paths so out-of-tree builds and symlinks behave consistently. | ||
| get_filename_component(LIVEKIT_CPP_EXAMPLES_SOURCE_DIR | ||
| "${CMAKE_SOURCE_DIR}/cpp-example-collection" ABSOLUTE) | ||
|
|
||
| get_filename_component(_lk_examples_install_default | ||
| "${CMAKE_SOURCE_DIR}/local-install" ABSOLUTE) | ||
| set(LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX "${_lk_examples_install_default}" | ||
| CACHE PATH "Install prefix used by cpp-example-collection") | ||
|
|
||
| get_filename_component(_lk_examples_binary_default | ||
| "${CMAKE_BINARY_DIR}/cpp-example-collection-build" ABSOLUTE) | ||
| set(LIVEKIT_CPP_EXAMPLES_BINARY_DIR "${_lk_examples_binary_default}" | ||
| CACHE PATH "Build directory for cpp-example-collection") | ||
|
|
||
| get_filename_component(LIVEKIT_CPP_EXAMPLES_LIVEKIT_DIR | ||
| "${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/LiveKit" | ||
| ABSOLUTE) | ||
|
|
||
| if(NOT EXISTS "${LIVEKIT_CPP_EXAMPLES_SOURCE_DIR}/CMakeLists.txt") | ||
| message(FATAL_ERROR | ||
| "cpp-example-collection submodule is missing. Run: " | ||
| "git submodule sync --recursive && " | ||
| "git submodule update --init --recursive --checkout") | ||
| endif() | ||
|
|
||
| add_custom_target(install_livekit_sdk_for_examples | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory "${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}" | ||
| COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" | ||
| --prefix "${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}" | ||
| --config "$<CONFIG>" | ||
| DEPENDS livekit | ||
| COMMENT "Installing LiveKit SDK for cpp-example-collection" | ||
| VERBATIM | ||
| ) | ||
|
|
||
| # cmake --install /Users/sderosa/workspaces/client-sdk-cpp/build-debug --prefix ~/livekit-sdk-local | ||
|
|
||
|
|
||
| add_custom_target(cpp_example_collection ALL | ||
| COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" | ||
| --prefix "${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}" | ||
| COMMAND ${CMAKE_COMMAND} -S "${LIVEKIT_CPP_EXAMPLES_SOURCE_DIR}" | ||
| -B "${LIVEKIT_CPP_EXAMPLES_BINARY_DIR}" | ||
| "-DCMAKE_PREFIX_PATH=${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}" | ||
| "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" | ||
| "-DLIVEKIT_LOCAL_SDK_DIR=${LIVEKIT_CPP_EXAMPLES_INSTALL_PREFIX}" | ||
| "-DLiveKit_DIR=${LIVEKIT_CPP_EXAMPLES_LIVEKIT_DIR}" | ||
| COMMAND ${CMAKE_COMMAND} --build "${LIVEKIT_CPP_EXAMPLES_BINARY_DIR}" | ||
| --config "$<CONFIG>" | ||
| DEPENDS install_livekit_sdk_for_examples | ||
stephen-derosa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| COMMENT "Configuring and building cpp-example-collection" | ||
| VERBATIM | ||
| ) | ||
|
Comment on lines
+33
to
+60
|
||
| endfunction() | ||
Uh oh!
There was an error while loading. Please reload this page.