Files
sarasacw-omrf/packer/README.md
T

46 lines
2.0 KiB
Markdown
Raw Normal View History

2026-08-03 14:22:56 +08:00
# sarasacw-omrf-packer
All packer used properties are stored in target Rust manifest file as metadata style.
There is an example about how to define them in `Cargo.toml`.
```toml
[package.metadata.omrf]
# Configures the minimum required sarasacw-omrf-packer version.
# Trying to run with an older version causes an error.
# This property is optional. If there is no specification, no version constraint is applied.
min_version = "1.0.0"
[package.metadata.omrf.headers]
assets = [
# `from` is the relative path to directory where this Cargo.toml is.
# `to` is the relative path to `include` directory which is the subdirectory of installation directory.
# Blank `to` means that put it directly in `include` directory.
{ from = "cbindgen/my_crate.h", to = "" },
{ from = "cbindgen/our_crate.h", to = "SomePrefix" },
# `from` support UNIX style pathname pattern expansion.
# It will find the toppest immutable component of given pattern.
# In this exmaple, this toppest immutable component is `pattern/with`.
# And use that as the root directory and put found files to `to` directory
# with preserving directory hierarchy.
{ from = "pattern/with/**/*", to = "" }
{ from = "pattern/with/**/*", to = "AllInOne" }
]
[package.metadata.omrf.cmake]
2026-08-03 15:15:18 +08:00
# Configures the namespace part of CMake target.
# This property is optional. The default value is extracted from the name of target Rust project.
namespace_name = "foobar"
# Configures the target part of CMake target.
# This property is optional. The default value is extracted from the name of target Rust project.
target_name = "foobar"
2026-08-03 14:22:56 +08:00
[package.metadata.omrf.pkgconfig]
2026-08-03 15:15:18 +08:00
# Configures the human-readable name of this package.
# This property is optional. The default value is extracted from the name of target Rust project.
name = "Foo Bar"
# Configures the brief description of this package.
# This property is optional. The default value is extracted from the description of target Rust project.
name = "a brown fox jumps over a lazy dog."
2026-08-03 14:22:56 +08:00
```