2009-09-28 19:43:28 +04:00
|
|
|
#=============================================================================
|
|
|
|
# CMake - Cross Platform Makefile Generator
|
|
|
|
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
|
|
|
|
2007-05-10 22:08:15 +04:00
|
|
|
# If the cmake version includes cpack, use it
|
2012-08-13 21:47:32 +04:00
|
|
|
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|
|
|
if(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
|
|
|
|
option(CMAKE_INSTALL_DEBUG_LIBRARIES
|
2007-11-07 21:11:58 +03:00
|
|
|
"Install Microsoft runtime debug libraries with CMake." FALSE)
|
2012-08-13 21:47:32 +04:00
|
|
|
mark_as_advanced(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
2011-01-14 00:43:56 +03:00
|
|
|
|
|
|
|
# By default, do not warn when built on machines using only VS Express:
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
|
|
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
|
|
|
endif()
|
2011-01-14 00:43:56 +03:00
|
|
|
|
2015-07-24 10:15:06 +03:00
|
|
|
if(CMake_INSTALL_DEPENDENCIES)
|
|
|
|
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
|
|
|
|
endif()
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "Kitware")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
2013-11-12 23:51:56 +04:00
|
|
|
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
|
2013-11-12 23:51:56 +04:00
|
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
|
|
|
# Installers for 32- vs. 64-bit CMake:
|
|
|
|
# - Root install directory (displayed to end user at installer-run time)
|
|
|
|
# - "NSIS package/display name" (text used in the installer GUI)
|
|
|
|
# - Registry key used to store info about the installation
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_CL_64)
|
|
|
|
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
2013-11-12 23:51:56 +04:00
|
|
|
set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
|
2012-08-13 21:47:32 +04:00
|
|
|
else()
|
|
|
|
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
2013-11-12 23:51:56 +04:00
|
|
|
set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
|
2012-08-13 21:47:32 +04:00
|
|
|
endif()
|
2013-11-12 23:51:56 +04:00
|
|
|
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_NSIS_PACKAGE_NAME}")
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT DEFINED CPACK_SYSTEM_NAME)
|
2008-05-20 20:35:38 +04:00
|
|
|
# make sure package is not Cygwin-unknown, for Cygwin just
|
|
|
|
# cygwin is good for the system name
|
2014-09-09 17:09:57 +04:00
|
|
|
if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xCYGWIN")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_SYSTEM_NAME Cygwin)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
|
|
|
|
if(CMAKE_CL_64)
|
|
|
|
set(CPACK_SYSTEM_NAME win64-x64)
|
2014-07-23 11:01:59 +04:00
|
|
|
set(CPACK_IFW_TARGET_DIRECTORY "@RootDir@/Program Files/${CMAKE_PROJECT_NAME}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_SYSTEM_NAME win32-x86)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2014-12-07 21:25:28 +03:00
|
|
|
# Components
|
2015-07-03 12:58:22 +03:00
|
|
|
if(CMake_INSTALL_COMPONENTS)
|
|
|
|
set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
|
2015-07-07 09:28:25 +03:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild)
|
|
|
|
endif()
|
2015-07-03 12:58:22 +03:00
|
|
|
if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME)
|
|
|
|
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME
|
|
|
|
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
|
|
|
|
else()
|
|
|
|
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME Unspecified)
|
|
|
|
endif()
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL ${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME})
|
|
|
|
string(TOUPPER "${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}"
|
|
|
|
_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME)
|
|
|
|
if(BUILD_CursesDialog)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL ccmake)
|
|
|
|
endif()
|
|
|
|
if(BUILD_QtDialog)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui)
|
2015-07-03 14:50:27 +03:00
|
|
|
set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES
|
|
|
|
\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\")")
|
2015-07-03 12:58:22 +03:00
|
|
|
endif()
|
|
|
|
if(SPHINX_MAN)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man)
|
|
|
|
endif()
|
|
|
|
if(SPHINX_HTML)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-html)
|
|
|
|
endif()
|
|
|
|
if(SPHINX_SINGLEHTML)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-singlehtml)
|
|
|
|
endif()
|
|
|
|
if(SPHINX_QTHELP)
|
|
|
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
|
|
|
|
endif()
|
|
|
|
set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
|
|
|
|
# Components
|
|
|
|
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
|
|
|
|
set(CPACK_COMPONENTS_GROUPING IGNORE)
|
|
|
|
")
|
2015-07-03 14:50:27 +03:00
|
|
|
else()
|
|
|
|
if(BUILD_QtDialog AND CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
|
|
|
|
set(_CPACK_IFW_ADDITIONAL_LICENSES
|
|
|
|
"\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\"")
|
|
|
|
endif()
|
2014-12-07 21:25:28 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Components scripts configuration
|
|
|
|
foreach(_script
|
|
|
|
CMake
|
|
|
|
CMake.Documentation.SphinxHTML)
|
|
|
|
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
|
|
|
|
"${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
|
|
|
|
endforeach()
|
|
|
|
|
2014-07-23 11:01:59 +04:00
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
|
2014-08-12 22:44:02 +04:00
|
|
|
set(_CPACK_IFW_PACKAGE_ICON
|
|
|
|
"set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")")
|
2015-07-03 12:58:22 +03:00
|
|
|
if(BUILD_QtDialog)
|
|
|
|
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/bin/cmake-gui.exe\", \"@StartMenuDir@/CMake (cmake-gui).lnk\");\n")
|
|
|
|
endif()
|
|
|
|
if(SPHINX_HTML)
|
|
|
|
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n")
|
|
|
|
endif()
|
|
|
|
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in"
|
|
|
|
"${CMake_BINARY_DIR}/installscript.qs" @ONLY
|
|
|
|
)
|
2014-07-23 11:01:59 +04:00
|
|
|
install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html"
|
2014-12-07 21:25:28 +03:00
|
|
|
DESTINATION "${CMAKE_DOC_DIR}"
|
2014-07-23 11:01:59 +04:00
|
|
|
)
|
2015-07-03 12:58:22 +03:00
|
|
|
if(CMake_INSTALL_COMPONENTS)
|
|
|
|
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/CMake.qs")
|
|
|
|
else()
|
|
|
|
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/installscript.qs")
|
|
|
|
endif()
|
2014-07-23 11:01:59 +04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
|
|
|
set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/${CMAKE_PROJECT_NAME}")
|
|
|
|
set(CPACK_IFW_ADMIN_TARGET_DIRECTORY "@ApplicationsDir@/${CMAKE_PROJECT_NAME}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(_CPACK_IFW_PACKAGE_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
|
2008-05-23 19:47:43 +04:00
|
|
|
# if the CPACK_PACKAGE_FILE_NAME is not defined by the cache
|
2012-08-13 21:42:58 +04:00
|
|
|
# default to source package - system, on cygwin system is not
|
2008-05-23 19:47:43 +04:00
|
|
|
# needed
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CYGWIN)
|
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME
|
2008-05-23 19:47:43 +04:00
|
|
|
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(UNIX)
|
|
|
|
set(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
|
|
|
|
set(CPACK_SOURCE_STRIP_FILES "")
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
|
|
|
# cygwin specific packaging stuff
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CYGWIN)
|
2007-10-31 06:02:43 +03:00
|
|
|
# setup the cygwin package name
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_NAME cmake)
|
2007-10-31 06:02:43 +03:00
|
|
|
# setup the name of the package for cygwin cmake-2.4.3
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME
|
2010-05-04 19:56:38 +04:00
|
|
|
"${CPACK_PACKAGE_NAME}-${CMake_VERSION}")
|
2007-10-31 06:02:43 +03:00
|
|
|
# the source has the same name as the binary
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
|
2007-10-31 06:02:43 +03:00
|
|
|
# Create a cygwin version number in case there are changes for cygwin
|
|
|
|
# that are not reflected upstream in CMake
|
2012-08-17 00:40:24 +04:00
|
|
|
set(CPACK_CYGWIN_PATCH_NUMBER 1 CACHE STRING "patch number for CMake cygwin packages")
|
|
|
|
mark_as_advanced(CPACK_CYGWIN_PATCH_NUMBER)
|
2007-05-10 22:08:15 +04:00
|
|
|
# These files are required by the cmCPackCygwinSourceGenerator and the files
|
|
|
|
# put into the release tar files.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_CYGWIN_BUILD_SCRIPT
|
2012-08-17 00:40:24 +04:00
|
|
|
"${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.sh")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_CYGWIN_PATCH_FILE
|
2012-08-17 00:40:24 +04:00
|
|
|
"${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.patch")
|
2007-10-31 06:02:43 +03:00
|
|
|
# include the sub directory cmake file for cygwin that
|
|
|
|
# configures some files and adds some install targets
|
|
|
|
# this file uses some of the package file name variables
|
2012-08-13 21:47:32 +04:00
|
|
|
include(Utilities/Release/Cygwin/CMakeLists.txt)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2013-05-08 19:13:31 +04:00
|
|
|
set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991")
|
|
|
|
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
|
2012-08-13 21:47:32 +04:00
|
|
|
set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
|
|
|
|
configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
|
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
2011-01-13 23:36:45 +03:00
|
|
|
|
2007-05-10 22:08:15 +04:00
|
|
|
# include CPack model once all variables are set
|
2012-08-13 21:47:32 +04:00
|
|
|
include(CPack)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|