Skip to content

Commit

Permalink
Add a feature to open libfontconfig at runtime.
Browse files Browse the repository at this point in the history
The feature is "fontconfig-dlopen".

This potentially makes installation with plotting simpler, because
exotic setups might not have libfontconfig in a "normal" place, and
finding the relevant pkg-config can be a headache, etc. etc.

As there's a good many features now available, these have now been
spaced out and commented.
  • Loading branch information
cjordan committed Aug 24, 2022
1 parent 4b24298 commit d58c520
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,47 @@ opt-level = 2

[features]
default = ["plotting"]

# Use CUDA code with double-precision floats.
cuda = [
"mwa_hyperdrive_cuda",
"mwa_hyperdrive_beam/cuda",
"mwa_hyperdrive_srclist/cuda",
]

# Use CUDA code with single-precision floats.
cuda-single = [
"cuda",
"mwa_hyperdrive_cuda/cuda-single",
"mwa_hyperdrive_beam/cuda-single",
"mwa_hyperdrive_srclist/cuda-single",
]

# Enable plotting.
plotting = ["plotters"]

# Use dlopen to find libfontconfig at runtime.
fontconfig-dlopen = ["plotters/fontconfig-dlopen"]

# Compile cfitsio statically and link it
cfitsio-static = [
"mwa_hyperdrive_common/cfitsio-static",
"birli/cfitsio-static",
]

# Compile cfitsio statically and link it
erfa-static = ["mwa_hyperdrive_common/erfa-static", "birli/erfa-static"]

# Compile HDF5 statically and link it
hdf5-static = [
"mwa_hyperdrive_beam/hdf5-static",
"mwa_hyperdrive_srclist/hdf5-static",
]

# Link CUDA statically
cuda-static = ["mwa_hyperdrive_common/cuda-static"]

# Link all C dependencies statically
all-static = ["erfa-static", "hdf5-static", "cfitsio-static", "cuda-static"]

[dependencies]
Expand Down
3 changes: 3 additions & 0 deletions mdbook/src/installation/from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
- Version must be `>=2.11.1`
- Arch: `pkg-config` `make` `cmake` `freetype2`
- Ubuntu: `libfreetype-dev` `libexpat1-dev`
- Installation may be eased by using the `fontconfig-dlopen` feature. This means
that `libfontconfig` is used at runtime, and not found and linked at link
time.
```

```admonish tip title="CUDA (for accelerated sky modelling)"
Expand Down

0 comments on commit d58c520

Please sign in to comment.