]> code.bitgloo.com Git - clyne/consteval-huffman.git/commitdiff
Include CPack only if top level project 4/head
authorfriendlyanon <friendlyanon@users.noreply.github.com>
Thu, 31 Dec 2020 16:06:18 +0000 (16:06 +0000)
committerfriendlyanon <friendlyanon@users.noreply.github.com>
Thu, 31 Dec 2020 16:06:18 +0000 (16:06 +0000)
CMakeLists.txt

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