You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,5 +9,49 @@ so it does not respect the usual structure of a Beman library repository nor The
9
9
10
10
## Description
11
11
12
+
*`cmake/`: CMake modules and toolchain files used by Beman libraries.
12
13
*`containers/`: Containers used for CI builds and tests in the Beman org.
13
14
*`tools/`: Tools used to manage the infrastructure and the codebase (e.g., linting, formatting, etc.).
15
+
16
+
## Usage
17
+
18
+
This repository is intended to be used as a beman-submodule in other Beman repositories. See
19
+
[the Beman Submodule documentation](./tools/beman-submodule/README.md) for details.
20
+
21
+
22
+
### CMake Modules
23
+
24
+
25
+
#### `beman_install_library`
26
+
27
+
The CMake modules in this repository are intended to be used by Beman libraries. Use the
28
+
`beman_add_install_library_config()` function to install your library, along with header
29
+
files, any metadata files, and a CMake config file for `find_package()` support.
30
+
31
+
```cmake
32
+
add_library(beman.something)
33
+
add_library(beman::something ALIAS beman.something)
34
+
35
+
# ... configure your target as needed ...
36
+
37
+
find_package(beman-install-library REQUIRED)
38
+
beman_install_library(beman.something)
39
+
```
40
+
41
+
Note that the target must be created before calling `beman_install_library()`. The module
42
+
also assumes that the target is named using the `beman.something` convention, and it
43
+
uses that assumption to derive the names to match other Beman standards and conventions.
44
+
If your target does not follow that convention, raise an issue or pull request to add
45
+
more configurability to the module.
46
+
47
+
The module will configure the target to install:
48
+
49
+
* The library target itself
50
+
* Any public headers associated with the target
51
+
* CMake files for `find_package(beman.something)` support
52
+
53
+
Some options for the project and target will also be supported:
54
+
55
+
*`BEMAN_INSTALL_CONFIG_FILE_PACKAGES` - a list of package names (e.g., `beman.something`) for which to install the config file
56
+
(default: all packages)
57
+
*`<BEMAN_NAME>_INSTALL_CONFIG_FILE_PACKAGE` - a per-project option to enable/disable config file installation (default: `ON` if the project is top-level, `OFF` otherwise). For instance for `beman.something`, the option would be `BEMAN_SOMETHING_INSTALL_CONFIG_FILE_PACKAGE`.
0 commit comments