From cad759079eec466051681775b0264b573f889566 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 21 Mar 2024 22:26:18 -0700 Subject: [PATCH] [rerun] Add rerun SDK dependency --- CMakeLists.txt | 3 +++ cmake/DARTFindDependencies.cmake | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec11de7db7eb7..09fd8a1d5d407 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,6 +207,9 @@ endif() option(DART_BUILD_WHEELS "Indicate building dartpy for wheels" OFF) +option(DART_BUILD_RERUN "Build with Rerun SDK" OFF) +option(DART_USE_SYSTEM_RERUN "Use system Rerun SDK" OFF) + #=============================================================================== # Find dependencies #=============================================================================== diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake index a763ce18b0354..c3cc8b6238e58 100644 --- a/cmake/DARTFindDependencies.cmake +++ b/cmake/DARTFindDependencies.cmake @@ -116,6 +116,18 @@ option(DART_SKIP_spdlog "If ON, do not use spdlog even if it is found." OFF) mark_as_advanced(DART_SKIP_spdlog) dart_find_package(spdlog) +if(DART_BUILD_RERUN) + if(DART_USE_SYSTEM_RERUN) + find_package(rerun REQUIRED) + else() + include(FetchContent) + FetchContent_Declare(rerun_sdk + URL https://github.com/rerun-io/rerun/releases/download/0.14.1/rerun_cpp_sdk.zip + ) + FetchContent_MakeAvailable(rerun_sdk) + endif() +endif() + #-------------------- # Misc. dependencies #-------------------- @@ -123,4 +135,3 @@ dart_find_package(spdlog) # Doxygen find_package(Doxygen QUIET) dart_check_optional_package(DOXYGEN "generating API documentation" "doxygen") -