summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-06-12 18:21:36 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-06-12 18:21:36 (GMT)
commit0964cb6c64d8ff67b97ced3459a5b054f935b66c (patch)
treed3f6c481e619c4fa536cdcd286b5b6323ae1586b /Modules/CPack.cmake
parent77b401ddb216542e9c6feaeec81da2d00c5bdc1b (diff)
downloadCMake-0964cb6c64d8ff67b97ced3459a5b054f935b66c.zip
CMake-0964cb6c64d8ff67b97ced3459a5b054f935b66c.tar.gz
CMake-0964cb6c64d8ff67b97ced3459a5b054f935b66c.tar.bz2
ENH: Add support for overwriting the name of the file CPackConfig.cmake and CPackSourceConfig.cmake
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r--Modules/CPack.cmake15
1 files changed, 12 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 316f269..99e19e6 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -1,3 +1,7 @@
+# Default output files will be CPackConfig.cmake and CPackSourceConfig.cmake.
+# This can be overwritten with CPACK_OUTPUT_CONFIG_FILE and
+# CPACK_SOURCE_OUTPUT_CONFIG_FILE.
+
# Pick a configuration file
SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
@@ -103,9 +107,14 @@ cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "@CPACK_PACKAGE_INSTALL_DIRECTORY@")
+cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE
+ "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
+
+cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE
+ "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
+
cpack_encode_variables()
-CONFIGURE_FILE("${cpack_input_file}"
- "${CMAKE_BINARY_DIR}/CPackConfig.cmake" @ONLY IMMEDIATE)
+CONFIGURE_FILE("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
# Generate source file
cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES
@@ -125,4 +134,4 @@ SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
cpack_encode_variables()
CONFIGURE_FILE("${cpack_source_input_file}"
- "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake" @ONLY IMMEDIATE)
+ "${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)