From fa23f66ad584883b3d117ca953b6539507c377ee Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 26 Sep 2017 08:49:28 -0400 Subject: CMakeCPack: Exclude version-control-specific files from source package --- CMakeCPack.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'CMakeCPack.cmake') diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index a0aacb4657..dc9f0bae68 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -245,5 +245,23 @@ configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY) set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake") +set(CPACK_SOURCE_IGNORE_FILES + # Files specific to version control. + "/\\\\.git/" + "/\\\\.gitattributes$" + "/\\\\.github/" + "/\\\\.gitignore$" + "/\\\\.hooks-config$" + + # Cygwin package build. + "/\\\\.build/" + + # Temporary files. + "\\\\.swp$" + "\\\\.#" + "/#" + "~$" + ) + # include CPack model once all variables are set include(CPack) -- cgit v1.2.1