summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r--Modules/CPack.cmake136
1 files changed, 68 insertions, 68 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index b79960e..513e112 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -285,48 +285,48 @@
# License text for the above reference.)
# Define this var in order to avoid (or warn) concerning multiple inclusion
-IF(CPack_CMake_INCLUDED)
- MESSAGE(WARNING "CPack.cmake has already been included!!")
-ELSE(CPack_CMake_INCLUDED)
- SET(CPack_CMake_INCLUDED 1)
-ENDIF(CPack_CMake_INCLUDED)
+if(CPack_CMake_INCLUDED)
+ message(WARNING "CPack.cmake has already been included!!")
+else(CPack_CMake_INCLUDED)
+ set(CPack_CMake_INCLUDED 1)
+endif(CPack_CMake_INCLUDED)
# Pick a configuration file
-SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
- SET(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-SET(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
- SET(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+ set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+ set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
# Backward compatibility
# Include CPackComponent macros if it has not already been included before.
include(CPackComponent)
# Macro for setting values if a user did not overwrite them
-MACRO(cpack_set_if_not_set name value)
- IF(NOT DEFINED "${name}")
- SET(${name} "${value}")
- ENDIF(NOT DEFINED "${name}")
-ENDMACRO(cpack_set_if_not_set)
+macro(cpack_set_if_not_set name value)
+ if(NOT DEFINED "${name}")
+ set(${name} "${value}")
+ endif(NOT DEFINED "${name}")
+endmacro(cpack_set_if_not_set)
# cpack_encode_variables - Macro to encode variables for the configuration file
# find any variable that starts with CPACK and create a variable
# _CPACK_OTHER_VARIABLES_ that contains SET commands for
# each cpack variable. _CPACK_OTHER_VARIABLES_ is then
# used as an @ replacment in configure_file for the CPackConfig.
-MACRO(cpack_encode_variables)
- SET(_CPACK_OTHER_VARIABLES_)
- GET_CMAKE_PROPERTY(res VARIABLES)
- FOREACH(var ${res})
- IF("xxx${var}" MATCHES "xxxCPACK")
- SET(_CPACK_OTHER_VARIABLES_
+macro(cpack_encode_variables)
+ set(_CPACK_OTHER_VARIABLES_)
+ get_cmake_property(res VARIABLES)
+ foreach(var ${res})
+ if("xxx${var}" MATCHES "xxxCPACK")
+ set(_CPACK_OTHER_VARIABLES_
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
- ENDIF("xxx${var}" MATCHES "xxxCPACK")
- ENDFOREACH(var ${res})
-ENDMACRO(cpack_encode_variables)
+ endif("xxx${var}" MATCHES "xxxCPACK")
+ endforeach(var ${res})
+endmacro(cpack_encode_variables)
# Set the package name
cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
@@ -350,22 +350,22 @@ cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
-IF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
- SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
-ENDIF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
-
-IF(CPACK_NSIS_MODIFY_PATH)
- SET(CPACK_NSIS_MODIFY_PATH ON)
-ENDIF(CPACK_NSIS_MODIFY_PATH)
-
-SET(__cpack_system_name ${CMAKE_SYSTEM_NAME})
-IF(${__cpack_system_name} MATCHES Windows)
- IF(CMAKE_CL_64)
- SET(__cpack_system_name win64)
- ELSE(CMAKE_CL_64)
- SET(__cpack_system_name win32)
- ENDIF(CMAKE_CL_64)
-ENDIF(${__cpack_system_name} MATCHES Windows)
+if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
+ set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+endif(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
+
+if(CPACK_NSIS_MODIFY_PATH)
+ set(CPACK_NSIS_MODIFY_PATH ON)
+endif(CPACK_NSIS_MODIFY_PATH)
+
+set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
+if(${__cpack_system_name} MATCHES Windows)
+ if(CMAKE_CL_64)
+ set(__cpack_system_name win64)
+ else(CMAKE_CL_64)
+ set(__cpack_system_name win32)
+ endif(CMAKE_CL_64)
+endif(${__cpack_system_name} MATCHES Windows)
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
# Root dir: default value should be the string literal "$PROGRAMFILES"
@@ -494,7 +494,7 @@ cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
# if the user has set CPACK_NSIS_DISPLAY_NAME remember it
if(DEFINED CPACK_NSIS_DISPLAY_NAME)
- SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
+ set(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
endif()
# if the user has set CPACK_NSIS_DISPLAY
# explicitly, then use that as the default
@@ -522,31 +522,31 @@ 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 "")
-IF(DEFINED CPACK_COMPONENTS_ALL)
- IF(CPACK_MONOLITHIC_INSTALL)
- MESSAGE("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
- SET(CPACK_COMPONENTS_ALL)
- ELSE(CPACK_MONOLITHIC_INSTALL)
+if(DEFINED CPACK_COMPONENTS_ALL)
+ if(CPACK_MONOLITHIC_INSTALL)
+ message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
+ set(CPACK_COMPONENTS_ALL)
+ else(CPACK_MONOLITHIC_INSTALL)
# The user has provided the set of components to be installed as
# part of a component-based installation; trust her.
- SET(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
- ENDIF(CPACK_MONOLITHIC_INSTALL)
-ELSE(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
+ endif(CPACK_MONOLITHIC_INSTALL)
+else(DEFINED CPACK_COMPONENTS_ALL)
# If the user has not specifically requested a monolithic installer
# but has specified components in various "install" commands, tell
# CPack about those components.
- IF(NOT CPACK_MONOLITHIC_INSTALL)
- GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
- LIST(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
- IF(CPACK_COMPONENTS_LEN EQUAL 1)
+ if(NOT CPACK_MONOLITHIC_INSTALL)
+ get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
+ list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
+ if(CPACK_COMPONENTS_LEN EQUAL 1)
# Only one component: this is not a component-based installation
# (at least, it isn't a component-based installation, but may
# become one later if the user uses the cpack_add_* commands).
- SET(CPACK_COMPONENTS_ALL)
- ENDIF(CPACK_COMPONENTS_LEN EQUAL 1)
- SET(CPACK_COMPONENTS_LEN)
- ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
-ENDIF(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL)
+ endif(CPACK_COMPONENTS_LEN EQUAL 1)
+ set(CPACK_COMPONENTS_LEN)
+ endif(NOT CPACK_MONOLITHIC_INSTALL)
+endif(DEFINED CPACK_COMPONENTS_ALL)
# CMake always generates a component named "Unspecified", which is
# used to install everything that doesn't have an explicitly-provided
@@ -566,13 +566,13 @@ cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
-SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
-SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
-SET(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
-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}")
+set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
+set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
+set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
+set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
+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_encode_variables()
configure_file("${cpack_source_input_file}"