Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aee3b0d

Browse files
traversarojleibs
authored andcommittedAug 2, 2024·
Add example of downloading rerun c++ lib via pixi
1 parent 3d087b9 commit aee3b0d

File tree

5 files changed

+1816
-494
lines changed

5 files changed

+1816
-494
lines changed
 

‎.github/workflows/cpp.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ jobs:
1414
pixi-version: v0.25.0
1515
cache: true
1616

17-
- run: pixi run build
17+
- name: run build task on all environments
18+
run: |
19+
pixi run -e default build
20+
pixi run -e rerunfindpackage build

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Build directory
1+
# Build directories
22
build
3+
buildrerunfindpackage
34

45
# Pixi environment
56
.pixi

‎README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ This is a minimal CMake project that shows how to use [Rerun](https://github.com
1616
The easiest way to get started is to install [pixi](https://prefix.dev/docs/pixi/overview).
1717

1818
The pixi environment described in `pixi.toml` contains all of the dependencies, including the rerun viewer,
19-
allowing you to run the example with a single command:
20-
* `pixi run example`
19+
allowing you to run the example with a single command, while the rerun C++ SDK is downloaded via `FetchContent`
20+
* `pixi run -e default example`
21+
22+
If you want to also download rerun C++ SDK via pixi, you can run:
23+
* `pixi run -e rerundfindpackage example`
2124

2225
## Without `pixi`
2326
If you choose not to use pixi, you will need to install a few things yourself before you get started.

‎pixi.lock

+1,774-488
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pixi.toml

+31-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ clean = { cmd = "rm -rf build bin CMakeFiles/" }
2828
print-env = { cmd = "echo $PATH" }
2929

3030
[target.win-64.tasks]
31-
prepare = "cmake -G 'Visual Studio 17 2022' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo"
31+
prepare = "cmake -G 'Visual Studio 17 2022' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRERUN_FIND_PACKAGE:BOOL=OFF"
3232
build = { cmd = "cmake --build build --config RelWithDebInfo", depends_on = [
3333
"prepare",
3434
] }
@@ -37,13 +37,33 @@ example = { cmd = "build/RelWithDebInfo/rerun_ext_example.exe", depends_on = [
3737
] }
3838

3939
[target.unix.tasks]
40-
prepare = "cmake -G 'Ninja' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo"
40+
prepare = "cmake -G 'Ninja' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRERUN_FIND_PACKAGE:BOOL=OFF"
4141
build = { cmd = "cmake --build build --config RelWithDebInfo --target all", depends_on = [
4242
"prepare",
4343
] }
4444
example = { cmd = "build/rerun_ext_example", depends_on = ["build"] }
4545
format = { cmd = "clang-format -i src/*" }
4646

47+
[feature.rerunfindpackage.target.win-64.tasks]
48+
prepare = "cmake -G 'Visual Studio 17 2022' -B buildrerunfindpackage -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRERUN_FIND_PACKAGE:BOOL=ON"
49+
build = { cmd = "cmake --build buildrerunfindpackage --config RelWithDebInfo", depends_on = [
50+
"prepare",
51+
] }
52+
example = { cmd = "buildrerunfindpackage/RelWithDebInfo/rerun_ext_example.exe", depends_on = [
53+
"build",
54+
] }
55+
56+
[feature.rerunfindpackage.target.unix.tasks]
57+
prepare = "cmake -G 'Ninja' -B buildrerunfindpackage -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRERUN_FIND_PACKAGE:BOOL=ON"
58+
build = { cmd = "cmake --build buildrerunfindpackage --config RelWithDebInfo --target all", depends_on = [
59+
"prepare",
60+
] }
61+
example = { cmd = "buildrerunfindpackage/rerun_ext_example", depends_on = [
62+
"build",
63+
] }
64+
format = { cmd = "clang-format -i src/*" }
65+
66+
4767
[dependencies]
4868
# Build tools:
4969
clang-tools = ">=15,<16" # clang-format
@@ -63,3 +83,12 @@ ninja = "1.11.1"
6383
[target.win-64.dependencies]
6484
# Build tools:
6585
vs2022_win-64 = "19.37.32822"
86+
87+
[feature.rerunfindpackage.dependencies]
88+
librerun-sdk = "0.17.0.*"
89+
90+
[environments]
91+
default = { solve-group = "defaultgroup" }
92+
rerunfindpackage = { features = [
93+
"rerunfindpackage",
94+
], solve-group = "defaultgroup" }

0 commit comments

Comments
 (0)
Please sign in to comment.