Include CPack only if top level project

pull/4/head
friendlyanon 4 years ago
parent 2028b12fda
commit 334dfb7027

@ -28,7 +28,6 @@ target_compile_features(consteval_huffman INTERFACE cxx_std_20)
# ---- Install ---- # ---- Install ----
include(CPack)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
@ -61,3 +60,7 @@ install(EXPORT consteval_huffmanTargets
NAMESPACE tcsullivan:: NAMESPACE tcsullivan::
DESTINATION "${consteval_huffman_install_cmakedir}" DESTINATION "${consteval_huffman_install_cmakedir}"
COMPONENT consteval_huffman_Package) COMPONENT consteval_huffman_Package)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(CPack)
endif()

Loading…
Cancel
Save