Skip to content

Commit

Permalink
Support finding rerun_sdk via find_package (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Reich <[email protected]>
  • Loading branch information
traversaro and Wumpf authored Apr 24, 2024
1 parent 5a1273e commit 4d8af1a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()

include(FetchContent)
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.15.1/rerun_cpp_sdk.zip)
FetchContent_MakeAvailable(rerun_sdk)
set(RERUN_CPP_URL "https://github.com/rerun-io/rerun/releases/download/0.15.1/rerun_cpp_sdk.zip" CACHE STRING "URL to the rerun_cpp zip.")
option(RERUN_FIND_PACKAGE "Whether to use find_package to find a preinstalled rerun package (instead of using FetchContent)." OFF)

if(RERUN_FIND_PACKAGE)
find_package(rerun_sdk REQUIRED)
else()
# Download the rerun_sdk
include(FetchContent)
FetchContent_Declare(rerun_sdk URL ${RERUN_CPP_URL})
FetchContent_MakeAvailable(rerun_sdk)
endif()

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
Expand Down

0 comments on commit 4d8af1a

Please sign in to comment.