Skip to content
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

Add: examples: cpp: CMake Standalone use latest release tag #70

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples/cpp/CMakeLists_Standalone.txt
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion 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
Expand All @@ -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
```