Expand description
sdecay-sys has multiple build modes, defined by
SANDIA_DECAY_INCLUDE_DIRenvironment variableSANDIA_DECAY_LIB_DIRenvironment variableSANDIA_DECAY_GITenvironment variableSANDIA_DECAY_IGNORE_CHECKSenvironment variablegitfeature ofsdecay-syscrate 1
§Git submodule
If git feature is active, or SANDIA_DECAY_GIT environment variable is set (has any value, possibly ""), SandiaDecay library will be built with the crate and statically linked to it.
Most likely, this is the mode you want to use, as it required no manual clone and cmake build - in fact, you don’t even need cmake installed on your system!
Example:
# Cargo.toml
[dependencies]
sdecay = { version = ..., features = [ "git" ] }or
# .cargo/config.toml
SANDIA_DECAY_GIT="1"§Paths
If git feature is disabled and SANDIA_DECAY_GIT environment variable is not set, crate checks for SANDIA_DECAY_INCLUDE_DIR and SANDIA_DECAY_LIB_DIR environment variables, corresponding to location of SandiaDecay’s header and compiled binary.
SANDIA_DECAY_IGNORE_CHECKS environment variable.
This is a reasonable option, if SandiaDecay is used by other programs, but not installed system-wide.
Example:
# Cargo.toml
[dependencies]
sdecay = ...# .cargo/config.toml
SANDIA_DECAY_INCLUDE_DIR = "/home/me/repos/SandiaDecay/"
SANDIA_DECAY_LIB_DIR = "/home/me/repos/SandiaDecay/build"(assuming SandiaDecay repo was cloned to /home/me/repos/SandiaDecay/ and built it the build subdirectory)
§From default
In case none of the mentioned elements are present, crate will still try to compile hoping for SandiaDecay headers to be in “default include paths”, and SandiaDecay binary be in “default library paths”.
Example:
# Cargo.toml
[dependencies]
sdecay = ...(assuming SandiaDecay.h is somewhere like /usr/include, and libSandiaDecay.a is somewhere like /usr/lib)
note, that
sdecayhas agitfeature for the purpose of relaying it tosdecay-sys. If you are usingsdecay, you can enable it’sgitfeature to trigger the behavior ↩