You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already have rerun_c binaries uploaded on every devlopment build.
With these it should be possible to provide a CMake setup where a user no longer needs to do any rust build
The text was updated successfully, but these errors were encountered:
Wumpf
changed the title
Documented CMake setup for using the C++ sdk with pre-built rerun_c
Provide CMake setup for using the C++ sdk with pre-built rerun_c
Oct 10, 2023
…tent (#3875)
### What
* Fixes#3759
Change CMakeLists.txt in rerun_cpp to work standalone with
add_directory.
When used in this fashion it expects the `RERUN_C_LIB` variable to be
set. The default for it points to a local `lib` folder with
appropriately named libs.
This in turn gives rise to a very trivial bundling strategy:
* copy src
* copy CMakeLists.txt
* copy libs
This is done in the new `build_and_upload_rerun_cpp` script which on top
of the above also takes care of testing the resulting artifact by
running the now also compatible minimal example outside of the repo.
Another smaller necessary change is that the rerun.h C header is now
copied into the rerun_cpp sdk with a patched version number in the
comment. This is primarily so to keep the above process super simple and
shave of an additional include directory.
~Draft until PR ci confirmed to be working.~
(PR checks only the linux artifact, main ci checks the full artifact and
puts it on the Development Release notes)
With this change, the minimal possible cmake script for a project using
Rerun is:
```cmake
project(hello_rerun)
include(FetchContent)
FetchContent_Declare(rerun_sdk URL https://build.rerun.io/commit/f4e5ad6/rerun_cpp.zip DOWNLOAD_EXTRACT_TIMESTAMP YES)
FetchContent_MakeAvailable(rerun_sdk)
add_executable(hello_rerun main.cpp)
set_property(TARGET hello_rerun PROPERTY CXX_STANDARD 20) # Rerun requires C++17, but you can of course use an ever newer version.
target_link_libraries(hello_rerun PRIVATE rerun_sdk)
```
⚠️ **this STILL requires libarrow to be installed somewhere where cmake
can find it** ⚠️
### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3875) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
- [PR Build Summary](https://build.rerun.io/pr/3875)
- [Docs
preview](https://rerun.io/preview/9ddbc213c8f4bd2ea288590f9ab2f2b9d48ae552/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/9ddbc213c8f4bd2ea288590f9ab2f2b9d48ae552/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
We already have rerun_c binaries uploaded on every devlopment build.
With these it should be possible to provide a CMake setup where a user no longer needs to do any rust build
The text was updated successfully, but these errors were encountered: