From 659d32be36dd121f560c61a3bfd216e2dc2e4515 Mon Sep 17 00:00:00 2001
From: Raul Victor Trombin <raulvtrombin@gmail.com>
Date: Thu, 14 Mar 2024 22:53:16 -0300
Subject: [PATCH 1/2] examples: cpp: CMake Standalone use latest binaries

---
 examples/cpp/CMakeLists_Standalone.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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

From ccfe516fd9e625616f80ee26041440daf3dee79e Mon Sep 17 00:00:00 2001
From: Raul Victor Trombin <raulvtrombin@gmail.com>
Date: Thu, 14 Mar 2024 22:54:01 -0300
Subject: [PATCH 2/2] examples: cpp: Update instructions to CMake standalone
 project example

---
 examples/cpp/README.md | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

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