summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-10-31 03:02:43 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-10-31 03:02:43 (GMT)
commiteb14543939343f66b236f26a5a2c892d6093c635 (patch)
treeea87cf50f22dfea34bcb37536f45c1f711ee68ed /Modules/CPack.cmake
parent9bd0d0f1ed74ffbeffb2dd8bd6af6f2bd8271893 (diff)
downloadCMake-eb14543939343f66b236f26a5a2c892d6093c635.zip
CMake-eb14543939343f66b236f26a5a2c892d6093c635.tar.gz
CMake-eb14543939343f66b236f26a5a2c892d6093c635.tar.bz2
ENH: cpack changes, remove the escape variable stuff as it is not needed if you provide a config file for cpack
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r--Modules/CPack.cmake92
1 files changed, 3 insertions, 89 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 09ddc80..8148aae 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -19,39 +19,6 @@ MACRO(cpack_set_if_not_set name value)
ENDIF(NOT DEFINED "${name}")
ENDMACRO(cpack_set_if_not_set)
-# create a new variable using var called
-# _${var}_ESC_ where var is the name of a variable.
-# the value of the new variable will have an extra
-# level of escapes so that it will preserve escapes
-# in the configured CPackConfig.cmake file.
-
-MACRO(cpack_escape_variable var)
- STRING(REPLACE "\\" "\\\\" var_value "${${var}}")
- STRING(REPLACE "\"" "\\\"" var_value "${var_value}")
- SET(_${var}_ESC_ "${var_value}")
-ENDMACRO(cpack_escape_variable)
-
-# do extra escapes on variables in CPACK_ESCAPE_VARIABLE
-# create "special" value variables like this
-# _(VARNAME)_ESC_ that store the extra escaped values for
-# the varibles. This is because the original variables
-# can not be used because this file gets included more
-# than once and things would get double double escacped.
-# (I think I want to escape...)
-MACRO(cpack_escape_variables)
- SET(_CPACK_OTHER_VARIABLES_)
- GET_CMAKE_PROPERTY(res VARIABLES)
- # first add extra escapes to the variables in CPACK_ESCAPE_VARIABLES
- FOREACH(var ${res})
- IF("xxx${var}" MATCHES "xxxCPACK")
- list(FIND CPACK_ESCAPE_VARIABLES "${var}" _SHOULD_BE_ESCAPED)
- if(_SHOULD_BE_ESCAPED GREATER -1)
- cpack_escape_variable(${var})
- endif(_SHOULD_BE_ESCAPED GREATER -1)
- ENDIF("xxx${var}" MATCHES "xxxCPACK")
- ENDFOREACH(var ${res})
-ENDMACRO(cpack_escape_variables)
-
# Macro to encode variables for the configuration file
# find any varable that stars with CPACK and create a variable
# _CPACK_OTHER_VARIABLES_ that contains SET commands for
@@ -62,17 +29,8 @@ MACRO(cpack_encode_variables)
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
IF("xxx${var}" MATCHES "xxxCPACK")
- # check for special escaped variables and use
- # the escaped value instead of the actual value for
- # the set.
- list(FIND CPACK_ESCAPE_VARIABLES "${var}" _SHOULD_BE_ESCAPED)
- if(_SHOULD_BE_ESCAPED GREATER -1)
- SET(_CPACK_OTHER_VARIABLES_
- "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${_${var}_ESC_}\")")
- else(_SHOULD_BE_ESCAPED GREATER -1)
- SET(_CPACK_OTHER_VARIABLES_
- "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
- endif(_SHOULD_BE_ESCAPED GREATER -1)
+ SET(_CPACK_OTHER_VARIABLES_
+ "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
ENDIF("xxx${var}" MATCHES "xxxCPACK")
ENDFOREACH(var ${res})
ENDMACRO(cpack_encode_variables)
@@ -148,7 +106,7 @@ if(NOT CPACK_GENERATOR)
else(CYGWIN)
if(APPLE)
option(CPACK_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
- option(CPACK_OSXX11 "Enable to build OSX X11 packages" ON)
+ option(CPACK_OSXX11 "Enable to build OSX X11 packages" OFF)
else(APPLE)
option(CPACK_TZ "Enable to build TZ packages" ON)
endif(APPLE)
@@ -227,50 +185,7 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
-# escape variables now before we do the icon define
-# stuff
-cpack_escape_variables()
-
-# if CPACK_PACKAGE_ICON is set, then create a
-# cpack variable that contains the NSIS code to define
-# the CPACK_PACKAGE_ICON and MUI_HEADERIMAGE_BITMAP, this is used
-# as an icon in the install wizard
-# handle ESC_CPACK_PACKAGE_ICON version as well, that does
-# not require extra escapes
-
-if(CPACK_PACKAGE_ICON)
- if(DEFINED _CPACK_PACKAGE_ICON_ESC_)
- set(CPACK_NSIS_INSTALLER_ICON_CODE "
-!define CPACK_PACKAGE_ICON \\\"@_CPACK_PACKAGE_ICON_ESC_@\\\"
-!define MUI_HEADERIMAGE_BITMAP \\\"@_CPACK_PACKAGE_ICON_ESC_@\\\"
-")
- else(DEFINED _CPACK_PACKAGE_ICON_ESC_)
- set(CPACK_NSIS_INSTALLER_ICON_CODE "
-!define CPACK_PACKAGE_ICON \\\"@CPACK_PACKAGE_ICON@\\\"
-!define MUI_HEADERIMAGE_BITMAP \\\"@CPACK_PACKAGE_ICON@\\\"
-")
- endif(DEFINED _CPACK_PACKAGE_ICON_ESC_)
-endif(CPACK_PACKAGE_ICON)
-
-
-if(CPACK_NSIS_MUI_ICON AND CPACK_NSIS_MUI_UNIICON)
- if(DEFINED _CPACK_NSIS_MUI_ICON_ESC_)
- set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "
-!define MUI_ICON \\\"@_CPACK_NSIS_MUI_ICON_ESC_@\\\"
-!define MUI_UNICON \\\"@_CPACK_NSIS_MUI_UNIICON_ESC_@\\\"
-")
- else(DEFINED _CPACK_NSIS_MUI_ICON_ESC_)
- set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "
-!define MUI_ICON \\\"@CPACK_NSIS_MUI_ICON@\\\"
-!define MUI_UNICON \\\"@CPACK_NSIS_MUI_UNIICON@\\\"
-")
- endif(DEFINED _CPACK_NSIS_MUI_ICON_ESC_)
-endif(CPACK_NSIS_MUI_ICON AND CPACK_NSIS_MUI_UNIICON)
-
cpack_encode_variables()
-
-
-
configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
# Generate source file
@@ -289,7 +204,6 @@ SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
SET(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
-cpack_escape_variables()
cpack_encode_variables()
configure_file("${cpack_source_input_file}"
"${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)