-
Notifications
You must be signed in to change notification settings - Fork 8
/
pixi.toml
123 lines (99 loc) · 4.21 KB
/
pixi.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Pixi is a package management tool for developers.
# Before running a task, pixi ensures that all listed dependencies are installed first.
#
# Pixi is not required for rerun, but it is a convenient way to install the
# dependencies required for this example.
#
# https://prefix.dev/docs/pixi/overview
#
# Use `pixi task list` to list the available tasks,
# and `pixi run TASK` to run it (e.g. `pixi run example`).
[project]
name = "rerun_cpp_example_opencv_eigen"
authors = ["rerun.io <[email protected]>"]
channels = ["conda-forge"]
description = "Use the Rerun C++ SDK together with Eigen and OpenCV"
homepage = "https://rerun.io"
license = "MIT OR Apache-2.0"
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
readme = "README.md"
repository = "https://github.com/rerun-io/cpp-example-opencv-eigen"
version = "0.1.0"
# The following activation scripts make the tasks portable cross-platform.
#
# They define:
# - CMAKE_GENERATOR
# - BUILD_FOLDER
# - EXE_PATH
#
# In particular, BUILD_FOLDER will be set to either:
# - build_fetchcontent
# - build_findpackage
# depending on the feature being used.
[activation]
scripts = ["pixi/env.sh"]
[target.win-64.activation]
scripts = ["pixi/env.bat"]
################################################################################
# Common Tasks
################################################################################
[tasks]
print-env = { cmd = "echo $PATH" }
[target.unix.tasks]
# This task only runs properly Unix systems.
format = { cmd = "clang-format -i src/*" }
################################################################################
# Building against Rerun using the default of FetchContent.
#
# The rerun-cpp source will be downloaded and built as part of the build.
################################################################################
[feature.fetchcontent.tasks]
prepare-fetchcontent = "cmake -B $BUILD_FOLDER -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo"
build-fetchcontent = { cmd = "cmake --build $BUILD_FOLDER --config RelWithDebInfo", depends_on = [
"prepare-fetchcontent",
] }
example = { cmd = "$EXE_PATH", depends_on = ["build-fetchcontent"] }
clean = { cmd = "rm -rf $BUILD_FOLDER bin CMakeFiles/" }
################################################################################
# Alternatively, build by locating Rerun via find_package
#
# In this case rerun is provided by the `librerun-sdk` package in the
# conda environment.
################################################################################
[feature.findpackage.tasks]
prepare-findpackage = "cmake -B $BUILD_FOLDER -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRERUN_FIND_PACKAGE:BOOL=ON"
build-findpackage = { cmd = "cmake --build $BUILD_FOLDER --config RelWithDebInfo", depends_on = [
"prepare-findpackage",
] }
example-findpackage = { cmd = "$EXE_PATH", depends_on = ["build-findpackage"] }
clean = { cmd = "rm -rf $BUILD_FOLDER bin CMakeFiles/" }
################################################################################
# Dependencies
################################################################################
[dependencies]
# Build tools:
clang-tools = ">=15,<16" # clang-format
cmake = "3.27.6"
# Required by this example:
eigen = "3.4.0.*"
opencv = "4.8.1.*"
# Installs the Rerun Python SDK so the user doesn't have to download & install rerun-cli manually.
# TODO(jleibs): In the future we'll want to use a rerun-cli package that only contains the CLI.
rerun-sdk = "0.18.2"
[target.linux-64.dependencies]
sysroot_linux-64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[target.linux-aarch64.dependencies]
sysroot_linux-aarch64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[target.unix.dependencies]
# Build tools:
cxx-compiler = "1.6.0.*"
ninja = "1.11.1"
[target.win-64.dependencies]
# Build tools:
vs2022_win-64 = "19.37.32822"
[feature.findpackage.dependencies]
librerun-sdk = "0.18.2"
[environments]
default = { solve-group = "defaultgroup" }
fetchcontent = { features = ["fetchcontent"], solve-group = "defaultgroup" }
findpackage = { features = ["findpackage"], solve-group = "defaultgroup" }