1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-08 15:53:51 +00:00

fix: only use CPack if this is the main project (#902)

Alternative fix to, and closes #900.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner 2023-09-15 16:21:40 -04:00 committed by GitHub
parent f0e405545c
commit 826415f8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,6 +198,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND EXISTS "${CMAKE_CURRENT_SOURCE_D
endif()
# Packaging support
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CPACK_PACKAGE_VENDOR "github.com/CLIUtils/CLI11")
set(CPACK_PACKAGE_CONTACT "https://${CPACK_PACKAGE_VENDOR}")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) # Automatic in CMake 3.12+
@ -234,3 +235,4 @@ set(CPACK_DEBIAN_COMPRESSION_TYPE "xz")
set(CPACK_DEBIAN_PACKAGE_NAME "libcli11-dev")
include(CPack)
endif()