mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-08 23:53:52 +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:
parent
f0e405545c
commit
826415f8ba
@ -198,6 +198,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND EXISTS "${CMAKE_CURRENT_SOURCE_D
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Packaging support
|
# Packaging support
|
||||||
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
set(CPACK_PACKAGE_VENDOR "github.com/CLIUtils/CLI11")
|
set(CPACK_PACKAGE_VENDOR "github.com/CLIUtils/CLI11")
|
||||||
set(CPACK_PACKAGE_CONTACT "https://${CPACK_PACKAGE_VENDOR}")
|
set(CPACK_PACKAGE_CONTACT "https://${CPACK_PACKAGE_VENDOR}")
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) # Automatic in CMake 3.12+
|
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")
|
set(CPACK_DEBIAN_PACKAGE_NAME "libcli11-dev")
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user