diff --git a/examples/cpp/CMakeLists_Standalone.txt b/examples/cpp/CMakeLists_Standalone.txt index 015629d71..5ca8f4443 100644 --- a/examples/cpp/CMakeLists_Standalone.txt +++ b/examples/cpp/CMakeLists_Standalone.txt @@ -4,12 +4,14 @@ project(example) include(ExternalProject) if(NOT DEFINED NAVIGATOR_VERSION) - set(NAVIGATOR_VERSION "0.0.1") + set(ZIP_URL "https://github.com/bluerobotics/navigator-lib/releases/latest/download/cpp.zip") + message(STATUS "Using Navigator lib version: latest") +else() + set(ZIP_URL "https://github.com/bluerobotics/navigator-lib/releases/download/${NAVIGATOR_VERSION}/cpp.zip") + message(STATUS "Using Navigator lib version: ${NAVIGATOR_VERSION}") endif() -set(ZIP_URL "https://github.com/bluerobotics/navigator-lib/releases/download/${NAVIGATOR_VERSION}/cpp.zip") set(ZIP_UNPACK_DIR "${CMAKE_BINARY_DIR}/navigator_zip_contents") -message(STATUS "Using Navigator lib version: ${NAVIGATOR_VERSION}") message(STATUS "Identified system processor: ${CMAKE_SYSTEM_PROCESSOR}") # Download released navigator lib files diff --git a/examples/cpp/README.md b/examples/cpp/README.md index b1e15a816..f0be76dae 100644 --- a/examples/cpp/README.md +++ b/examples/cpp/README.md @@ -1,6 +1,6 @@ # How to use -For BlueOS (red-pill) +## Running example on BlueOS (red-pill) ```shell # Prepare the environment with cmake and cargo @@ -19,3 +19,10 @@ cmake -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build --config Debug -- ./build/simple ``` + +## Using Standalone Version +Rename the CMakeLists_Standalone to CMakeLists. +By default Standalone project will use latest versions, but a version can be selected as follows: +```shell +cmake -B build -DCMAKE_BUILD_TYPE=Debug -DNAVIGATOR_VERSION="0.0.1" && cmake --build build --config Debug --parallel +``` \ No newline at end of file