XavierBerger / cmake-init-multiple-packages

Example for creating multiple packages with CPack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiple-packages

This project was generated by cmake-init.
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 for more details.

Packaging

Take a look at the CI workflow 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.

About

Example for creating multiple packages with CPack


Languages

Language:CMake 95.0%Language:C++ 5.0%