https://github.com/friendlyanon/cmake-init-multiple-packages
Example for creating multiple packages with CPack
https://github.com/friendlyanon/cmake-init-multiple-packages
Last synced: 12 days ago
JSON representation
Example for creating multiple packages with CPack
- Host: GitHub
- URL: https://github.com/friendlyanon/cmake-init-multiple-packages
- Owner: friendlyanon
- Created: 2021-10-23T00:27:49.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-25T12:42:24.000Z (about 4 years ago)
- Last Synced: 2025-03-11T08:12:52.743Z (10 months ago)
- Language: CMake
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# multiple-packages
This project was generated by [cmake-init][1].
It's heavily stripped down to focus on showing how to create multiple packages
from a single project.
## Component groups
This project has 2 component groups:
* `multiple-packages_a`
* `multiple-packages_b`
These component groups are defined using variables in the `group-a` and
`group-b` presets. The same result could have been achieved by using commands
from the `CPackComponent` module. Each component group has 2 components
associated to them, which are the runtime and development components.
Take a look at the [presets](CMakePresets.json) for more details.
## Packaging
Take a look at the [CI workflow](.github/workflows/ci.yml) for packaging.
If you want to test the commands on Windows, you have to:
* Use the `package-zip-win64` preset
* Build the `build/win64` directory using the `--config` flag
* Example: `cmake --build build/win64 --config Release`
* `cd` into the `build/win64` directory and package using the `-C` flag
* Example: `cd build/win64 && cpack -C Release`
These are not really Windows specific, but on Windows a VS generator is the
default and the VS generators are multi-config, as opposed to a single-config
generator like the `Unix Makefiles` one.
[1]: https://github.com/friendlyanon/cmake-init