packaging/CMakeLists.txt
Share
Before including the packaging module, we set some variables:
CPACK_PACAGE_<variable> sets meta information such as package name, vendor, version, etc. CPACK_RESOURCE_FILE_<txt> specifies the txt file to display when installing the package. Set Welcome.txt, License.txt, and Readme.txt.
CPACK_GENERATOR configures the platform installer.
Once each setting is complete, include the CPack module.
include(CPack)
Set the components of the target to be packaged. In CppRestApi, targets are componentized in Directory.cmake. The components added to the package by CppRestApi are CppRestApi_Runtime and CppRestApi_Development. Before componentizing the project target, configure general CPack settings.
cpack_add_component(CppRestApi_Runtime ...)
cpack_add_component(CppRestApi_Development ...)
cpack_add_component(CppRestApi_Samples ...)
cpack_add_component(CppRestApi_ApiDocs ...)
cpack_add_component_group(CppRestApi_SDK ...)
cpack_add_component_group(CppRestApi_SDK ...)