diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 3a72eaa5c..47dad49c2 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -51,3 +51,27 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
endif()
endif()
+
+if("${CPACK_GENERATOR}" STREQUAL "WIX")
+ # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
+ # But the file names still use the full CMake_VERSION value:
+ set(CPACK_PACKAGE_FILE_NAME
+ "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME
+ "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
+
+ if(NOT CPACK_WIX_SIZEOF_VOID_P)
+ set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
+ endif()
+
+ set(CPACK_PACKAGE_VERSION
+ "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@")
+ # WIX installers require at most a 4 component version number, where
+ # each component is an integer between 0 and 65534 inclusive
+ set(tweak "@CMake_VERSION_TWEAK@")
+ if(tweak MATCHES "^[0-9]+$")
+ if(tweak GREATER 0 AND tweak LESS 65535)
+ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${tweak}")
+ endif()
+ endif()
+endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a67fb6e62..e84f8980e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,8 +234,6 @@ macro (CMAKE_BUILD_UTILITIES)
set(kwsys_folder "Utilities/KWSys")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}")
if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
@@ -590,10 +588,10 @@ if(NOT CMake_VERSION_IS_RELEASE)
NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
-Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
- -Wmissing-format-attribute -fno-common
+ -Wmissing-format-attribute -fno-common -Wundef
)
set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
- -Wshadow -Wpointer-arith -Wformat-security
+ -Wshadow -Wpointer-arith -Wformat-security -Wundef
)
foreach(FLAG_LANG C CXX)
diff --git a/ChangeLog.manual b/ChangeLog.manual
index aa5534812..90c91629e 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,17 @@
+Changes in CMake 2.8.10.2 (since 2.8.10.1)
+----------------------------------------------
+Alex Neundorf (1):
+ Automoc: fix regression #13667, broken build in phonon
+
+Brad King (1):
+ Initialize IMPORTED GLOBAL targets on reconfigure (#13702)
+
+David Cole (1):
+ CMake: Fix infinite loop untarring corrupt tar file
+
+Rolf Eike Beer (1):
+ FindGettext: fix overwriting result with empty variable (#13691)
+
Changes in CMake 2.8.10.1 (since 2.8.10)
----------------------------------------------
Brad King (5):
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index d74dcdcee..c41adc956 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -50,6 +50,7 @@ endif()
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 8c5d84e6c..9287b8194 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -51,6 +51,7 @@ endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 75247d955..25d6bbea7 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -72,19 +72,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
set(implicit_libs "")
- set(MULTI_ARCH FALSE)
- if(DEFINED CMAKE_OSX_ARCHITECTURES)
- if( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
- set(MULTI_ARCH TRUE)
- endif()
- endif()
- if(CMAKE_${lang}_VERBOSE_FLAG
- # Implicit link information cannot be used explicitly for
- # multiple OS X architectures, so we skip it.
- AND NOT MULTI_ARCH
- # Skip this with Xcode for now.
- AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
- CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+ set(implicit_fwks "")
+ if(CMAKE_${lang}_VERBOSE_FLAG)
+ CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
@@ -112,8 +102,17 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(STATUS "${_desc}")
endif()
+ # Implicit link libraries cannot be used explicitly for multiple
+ # OS X architectures, so we skip it.
+ if(DEFINED CMAKE_OSX_ARCHITECTURES)
+ if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ";")
+ set(implicit_libs "")
+ endif()
+ endif()
+
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
+ set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${implicit_fwks}" PARENT_SCOPE)
# Detect library architecture directory name.
if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 906a5e7ba..609f35bf7 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -107,11 +107,14 @@ Id flags: ${testflags}
")
# Compile the compiler identification source.
- if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)( .NET)?( 200[358])? *((Win64|IA64|ARM))?")
+ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
set(vs_version ${CMAKE_MATCH_1})
- set(vs_arch ${CMAKE_MATCH_4})
+ set(id_arch ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_cl cl.exe)
+ if(NOT id_arch)
+ set(id_arch Win32)
+ endif()
if(NOT "${vs_version}" VERSION_LESS 10)
set(v 10)
set(ext vcxproj)
@@ -123,25 +126,26 @@ Id flags: ${testflags}
set(v 6)
set(ext dsp)
endif()
- if("${vs_arch}" STREQUAL "Win64")
- set(id_machine_7 17)
+ if("${id_arch}" STREQUAL "x64")
set(id_machine_10 MachineX64)
- set(id_arch x64)
- elseif("${vs_arch}" STREQUAL "IA64")
- set(id_machine_7 5)
+ elseif("${id_arch}" STREQUAL "Itanium")
set(id_machine_10 MachineIA64)
set(id_arch ia64)
else()
set(id_machine_6 x86)
- set(id_machine_7 1)
set(id_machine_10 MachineX86)
- set(id_arch Win32)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET)
set(id_toolset "${CMAKE_VS_PLATFORM_TOOLSET}")
else()
set(id_toolset "")
endif()
+ if(CMAKE_VS_WINCE_VERSION)
+ set(id_entrypoint "mainACRTStartup")
+ set(id_subsystem 9)
+ else()
+ set(id_subsystem 1)
+ endif()
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
set(build /p:Configuration=Debug /p:Platform=@id_arch@ /p:VisualStudioVersion=${vs_version}.0)
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake
index c4217f552..ae9f5fcaf 100644
--- a/Modules/CMakeDetermineJavaCompiler.cmake
+++ b/Modules/CMakeDetermineJavaCompiler.cmake
@@ -63,6 +63,8 @@ if(NOT CMAKE_Java_COMPILER)
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
+ /usr/local/jdk-1.7.0/bin
+ /usr/local/jdk-1.6.0/bin
)
# if no compiler has been specified yet, then look for one
if(CMAKE_Java_COMPILER_INIT)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index cd3344756..c7f9c32a7 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -106,6 +106,12 @@ if(CMAKE_SYSTEM_NAME)
set(CMAKE_CROSSCOMPILING TRUE)
endif()
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
+elseif(CMAKE_VS_WINCE_VERSION)
+ set(CMAKE_SYSTEM_NAME "WindowsCE")
+ set(CMAKE_SYSTEM_VERSION "${CMAKE_VS_WINCE_VERSION}")
+ set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
+ set(CMAKE_CROSSCOMPILING TRUE)
+ set(PRESET_CMAKE_SYSTEM_NAME TRUE)
else()
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 55f827773..d193881d9 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -52,3 +52,4 @@ endif()
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 4d25de0ba..f84852aeb 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -74,12 +74,8 @@
PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]'
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
PRINT *, 'INFO:platform[Haiku]'
-# if 0
-! Haiku also defines __BEOS__ so we must
-! put it prior to the check for __BEOS__
-# endif
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 96ecb4270..a92ce7cc9 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -188,8 +188,13 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
endif()
endforeach()
+ get_filename_component(inputFileName "${_inputFile}" NAME)
+
set(PACKAGE_INIT "
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
+####### Any changes to this file will be overwritten by the next CMake run ####
+####### The input file was ${inputFileName} ########
+
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
")
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index ecb20dc6b..234fb7fa1 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -16,9 +16,10 @@
# This is used internally by CMake and should not be included by user
# code.
-function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
+function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
set(implicit_libs_tmp "")
set(implicit_dirs_tmp)
+ set(implicit_fwks_tmp)
set(log "")
# Parse implicit linker arguments.
@@ -36,6 +37,16 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
set(cmd)
if("${line}" MATCHES "${linker_regex}" AND
NOT "${line}" MATCHES "${linker_exclude_regex}")
+ if(XCODE)
+ # Xcode unconditionally adds a path under the project build tree and
+ # on older versions it is not reported with proper quotes. Remove it.
+ string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _dir_regex "${CMAKE_BINARY_DIR}")
+ string(REGEX REPLACE " -[FL]${_dir_regex}/([^ ]| [^-])+( |$)" " " xline "${line}")
+ if(NOT "x${xline}" STREQUAL "x${line}")
+ set(log "${log} reduced line: [${line}]\n to: [${xline}]\n")
+ set(line "${xline}")
+ endif()
+ endif()
if(UNIX)
separate_arguments(args UNIX_COMMAND "${line}")
else()
@@ -97,6 +108,18 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
endif()
endforeach()
+ # Look for library search paths reported by linker.
+ if("${output_lines}" MATCHES ";Library search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_dirs_match "${CMAKE_MATCH_1}")
+ set(log "${log} Library search paths: [${implicit_dirs_match}]\n")
+ list(APPEND implicit_dirs_tmp ${implicit_dirs_match})
+ endif()
+ if("${output_lines}" MATCHES ";Framework search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_fwks_match "${CMAKE_MATCH_1}")
+ set(log "${log} Framework search paths: [${implicit_fwks_match}]\n")
+ list(APPEND implicit_fwks_tmp ${implicit_fwks_match})
+ endif()
+
# Cleanup list of libraries and flags.
# We remove items that are not language-specific.
set(implicit_libs "")
@@ -108,21 +131,33 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
endif()
endforeach()
- # Cleanup list of directories.
- set(implicit_dirs "")
- foreach(d IN LISTS implicit_dirs_tmp)
- get_filename_component(dir "${d}" ABSOLUTE)
- list(APPEND implicit_dirs "${dir}")
- set(log "${log} collapse dir [${d}] ==> [${dir}]\n")
+ # Cleanup list of library and framework directories.
+ set(desc_dirs "library")
+ set(desc_fwks "framework")
+ foreach(t dirs fwks)
+ set(implicit_${t} "")
+ foreach(d IN LISTS implicit_${t}_tmp)
+ get_filename_component(dir "${d}" ABSOLUTE)
+ string(FIND "${dir}" "${CMAKE_FILES_DIRECTORY}/" pos)
+ if(NOT pos LESS 0)
+ set(msg ", skipping non-system directory")
+ else()
+ set(msg "")
+ list(APPEND implicit_${t} "${dir}")
+ endif()
+ set(log "${log} collapse ${desc_${t}} dir [${d}] ==> [${dir}]${msg}\n")
+ endforeach()
+ list(REMOVE_DUPLICATES implicit_${t})
endforeach()
- list(REMOVE_DUPLICATES implicit_dirs)
# Log results.
set(log "${log} implicit libs: [${implicit_libs}]\n")
set(log "${log} implicit dirs: [${implicit_dirs}]\n")
+ set(log "${log} implicit fwks: [${implicit_fwks}]\n")
# Return results.
set(${lib_var} "${implicit_libs}" PARENT_SCOPE)
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
+ set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE)
set(${log_var} "${log}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index c37341411..69171c2a3 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -35,11 +35,8 @@
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
-/* Haiku also defines __BEOS__ so we must
- put it prior to the check for __BEOS__
-*/
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 6886ed9fd..42d3c0c39 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -438,6 +438,7 @@ if(NOT CPACK_GENERATOR)
endif()
else()
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
+ option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
endif()
@@ -453,6 +454,7 @@ if(NOT CPACK_GENERATOR)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
+ cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
endif()
@@ -483,7 +485,7 @@ endif()
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
- CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
+ CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
@@ -522,6 +524,9 @@ 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 "")
+# WiX specific variables
+cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
+
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.")
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
new file mode 100644
index 000000000..0c0a8f19f
--- /dev/null
+++ b/Modules/CPackWIX.cmake
@@ -0,0 +1,109 @@
+##section Variables specific to CPack WiX generator
+##end
+##module
+# - CPack WiX generator specific options
+#
+# The following variables are specific to the installers built
+# on Windows using WiX.
+##end
+##variable
+# CPACK_WIX_UPGRADE_GUID - Upgrade GUID (Product/@UpgradeCode)
+#
+# Will be automatically generated unless explicitly provided.
+#
+# It should be explicitly set to a constant generated
+# gloabally unique identifier (GUID) to allow your installers
+# to replace existing installations that use the same GUID.
+#
+# You may for example explicitly set this variable in
+# your CMakeLists.txt to the value that has been generated per default.
+# You should not use GUIDs that you did not generate yourself or which may
+# belong to other projects.
+#
+# A GUID shall have the following fixed length syntax:
+# XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+# (each X represents an uppercase hexadecimal digit)
+##end
+##variable
+# CPACK_WIX_PRODUCT_GUID - Product GUID (Product/@Id)
+#
+# Will be automatically generated unless explicitly provided.
+#
+# If explicitly provided this will set the Product Id of your installer.
+#
+# The installer will abort if it detects a pre-existing installation that uses
+# the same GUID.
+#
+# The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.
+##end
+##variable
+# CPACK_WIX_LICENSE_RTF - RTF License File
+#
+# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension
+# it is used as-is.
+#
+# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension
+# it is implicitly converted to RTF by the WiX Generator.
+#
+# With CPACK_WIX_LICENSE_RTF you can override the license file used
+# by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE
+# is in an unsupported format or the .txt -> .rtf
+# conversion does not work as expected.
+#
+##end
+#
+##variable
+# CPACK_WIX_PRODUCT_ICON - The Icon shown next to the program name in Add/Remove programs.
+#
+# If set, this icon is used in place of the default icon.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_BANNER - The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs.
+#
+# If set, this image will replace the default banner image.
+#
+# This image must be 493 by 58 pixels.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_DIALOG - Background bitmap used on the welcome and completion dialogs.
+#
+# If this variable is set, the installer will replace the default dialog image.
+#
+# This image must be 493 by 312 pixels.
+#
+##end
+
+#=============================================================================
+# Copyright 2012 Kitware, Inc.
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+if(NOT CPACK_WIX_ROOT)
+ file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
+endif()
+
+find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
+ PATHS "${CPACK_WIX_ROOT}/bin")
+
+if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
+ message(FATAL_ERROR "Could not find the WiX candle executable.")
+endif()
+
+find_program(CPACK_WIX_LIGHT_EXECUTABLE light
+ PATHS "${CPACK_WIX_ROOT}/bin")
+
+if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
+ message(FATAL_ERROR "Could not find the WiX light executable.")
+endif()
diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake
index 6731d3754..24f5f2e16 100644
--- a/Modules/CTestUseLaunchers.cmake
+++ b/Modules/CTestUseLaunchers.cmake
@@ -35,7 +35,7 @@ if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT})
CACHE INTERNAL "CTEST_USE_LAUNCHERS initial value from ENV")
endif()
-if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
+if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
set(CTEST_USE_LAUNCHERS 0)
endif()
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c
index 882dc21b7..7250fbff6 100644
--- a/Modules/CheckForPthreads.c
+++ b/Modules/CheckForPthreads.c
@@ -16,7 +16,7 @@ int main(int ac, char*av[]){
pthread_create(&tid[0], 0, runner, (void*)1);
pthread_create(&tid[1], 0, runner, (void*)2);
-#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.)
+#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
usleep(1); // for strange behavior on single-processor sun
#endif
diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in
index 71bf64de2..fa48cadb3 100644
--- a/Modules/CompilerId/VS-7.vcproj.in
+++ b/Modules/CompilerId/VS-7.vcproj.in
@@ -24,7 +24,6 @@
"
+ )
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "$"
+ )
+ endforeach()
+ endif()
+ endmacro()
+
+ macro(_qt4_add_target_depends _QT_MODULE)
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES ${ARGN})
+ endmacro()
+
+ macro(_qt4_add_target_private_depends _QT_MODULE)
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES ${ARGN})
+ endmacro()
+
+
# Set QT_xyz_LIBRARY variable and add
# library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_MKSPECS_DIR}/default"
+ ${QT_INCLUDE_DIR}
+ )
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
+ _qt4_add_target_depends(${QT_MODULE} Core)
endforeach()
_QT4_ADJUST_LIB_VARS(QtAssistant)
@@ -958,6 +1013,41 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
_QT4_ADJUST_LIB_VARS(QAxContainer)
endif()
+ # Only public dependencies are listed here.
+ # Eg, QtDBus links to QtXml, but users of QtDBus do not need to
+ # link to QtXml because QtDBus only uses it internally, not in public
+ # headers.
+ # Everything depends on QtCore, but that is covered above already
+ _qt4_add_target_depends(Qt3Support Sql Gui Network)
+ if (TARGET Qt4::Qt3Support)
+ # An additional define is required for QT3_SUPPORT
+ set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT)
+ endif()
+ _qt4_add_target_depends(QtDeclarative Script Gui)
+ _qt4_add_target_depends(QtDesigner Gui)
+ _qt4_add_target_depends(QtHelp Gui)
+ _qt4_add_target_depends(QtMultimedia Gui)
+ _qt4_add_target_depends(QtOpenGL Gui)
+ _qt4_add_target_depends(QtSvg Gui)
+ _qt4_add_target_depends(QtWebKit Gui Network)
+
+ _qt4_add_target_private_depends(Qt3Support Xml)
+ _qt4_add_target_private_depends(QtSvg Xml)
+ _qt4_add_target_private_depends(QtDBus Xml)
+ _qt4_add_target_private_depends(QtUiTools Xml Gui)
+ _qt4_add_target_private_depends(QtHelp Sql Xml Network)
+ _qt4_add_target_private_depends(QtXmlPatterns Network)
+ _qt4_add_target_private_depends(QtScriptTools Gui)
+ _qt4_add_target_private_depends(QtWebKit XmlPatterns)
+ _qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui)
+ _qt4_add_target_private_depends(QtMultimedia Gui)
+ _qt4_add_target_private_depends(QtOpenGL Gui)
+ _qt4_add_target_private_depends(QAxServer Gui)
+ _qt4_add_target_private_depends(QAxContainer Gui)
+ _qt4_add_target_private_depends(phonon Gui)
+ if(QT_QTDBUS_FOUND)
+ _qt4_add_target_private_depends(phonon DBus)
+ endif()
#######################################
#
@@ -982,13 +1072,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif()
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
+ NAMES moc-qt4 moc moc4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
+ NAMES uic-qt4 uic uic4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1018,13 +1108,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
+ NAMES lupdate-qt4 lupdate lupdate4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
+ NAMES lrelease-qt4 lrelease lrelease4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1036,13 +1126,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
+ NAMES designer-qt4 designer designer4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
+ NAMES linguist-qt4 linguist linguist4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1170,11 +1260,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
include("${_qt4_current_dir}/Qt4Macros.cmake")
- # set version variables
- string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
endif()
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
index f2e9f25f5..fec142ed5 100644
--- a/Modules/FindSDL.cmake
+++ b/Modules/FindSDL.cmake
@@ -122,7 +122,7 @@ if(SDL_LIBRARY_TEMP)
if(SDLMAIN_LIBRARY AND NOT SDL_BUILDING_LIBRARY)
list(FIND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" _SDL_MAIN_INDEX)
if(_SDL_MAIN_INDEX EQUAL -1)
- list(APPEND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}")
+ set(SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" ${SDL_LIBRARY_TEMP})
endif()
unset(_SDL_MAIN_INDEX)
endif()
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 4cae03274..30d74acfb 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -40,7 +40,7 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_IMAGE_LIBRARY
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_IMAGE_INCLUDE_DIR AND EXISTS "${SDL_IMAGE_INCLUDE_DIR}/SDL_image.h")
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 666fc6e0f..8ca7cc33c 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -40,7 +40,7 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_MIXER_LIBRARY
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_MIXER_INCLUDE_DIR AND EXISTS "${SDL_MIXER_INCLUDE_DIR}/SDL_mixer.h")
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index d8f479f5b..ca707af8d 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -40,7 +40,7 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
HINTS
ENV SDLNETDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_NET_LIBRARY
HINTS
ENV SDLNETDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_NET_INCLUDE_DIR AND EXISTS "${SDL_NET_INCLUDE_DIR}/SDL_net.h")
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 5ff50be64..efd26580b 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -77,7 +77,7 @@ find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
find_library(SDL_SOUND_LIBRARY
@@ -85,6 +85,7 @@ find_library(SDL_SOUND_LIBRARY
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 2cc5ee232..bb0ca9147 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -40,7 +40,7 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_TTF_LIBRARY
HINTS
ENV SDLTTFDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h")
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 2f84ae091..f649ddc56 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -82,6 +82,10 @@ set(TCLTK_POSSIBLE_LIB_PATHS
"${TK_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
"${TK_WISH_PATH_PARENT}/lib"
+ /usr/local/lib/tcl/tcl8.5
+ /usr/local/lib/tcl/tk8.5
+ /usr/local/lib/tcl/tcl8.4
+ /usr/local/lib/tcl/tk8.4
)
if(WIN32)
@@ -168,6 +172,10 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
/usr/include/tcl8.3
/usr/include/tcl8.2
/usr/include/tcl8.0
+ /usr/local/include/tcl8.5
+ /usr/local/include/tk8.5
+ /usr/local/include/tcl8.4
+ /usr/local/include/tk8.4
)
if(WIN32)
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index ffc425e67..59a444bde 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -37,6 +37,9 @@
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
+ ;Require administrator access
+ RequestExecutionLevel admin
+
@CPACK_NSIS_DEFINES@
!include Sections.nsh
@@ -119,7 +122,7 @@ Var AR_RegFlags
"exit_${SecName}:"
!macroend
-!macro RemoveSection SecName
+!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
@@ -841,7 +844,7 @@ Section "Uninstall"
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
- !insertmacro SectionList "RemoveSection"
+ !insertmacro SectionList "RemoveSection_CPack"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index de7a85636..528873cfd 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -19,6 +19,7 @@ endif()
set(__DARWIN_COMPILER_CLANG 1)
macro(__darwin_compiler_clang lang)
+ set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index d9535039f..5fee7e3ae 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -19,6 +19,7 @@ endif()
set(__DARWIN_COMPILER_GNU 1)
macro(__darwin_compiler_gnu lang)
+ set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
# GNU does not have -shared on OS X
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index ed0b8af3f..2e6b71e36 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -256,6 +256,24 @@ set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
set(CMAKE_FIND_FRAMEWORK FIRST)
endif()
+
+# Older OS X linkers do not report their framework search path
+# with -v but "man ld" documents the following locations.
+set(CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ ${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
+ ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
+ )
+if(_CMAKE_OSX_SYSROOT_PATH)
+ # Treat some paths as implicit so we do not override the SDK versions.
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ /System/Library/Frameworks)
+endif()
+if("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
+ # Older OS X tools had more implicit paths.
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks)
+endif()
+
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake
index df240e01b..53cabedde 100644
--- a/Modules/Platform/OpenBSD.cmake
+++ b/Modules/Platform/OpenBSD.cmake
@@ -16,3 +16,7 @@ if(NOT CMAKE_PLATFORM_RUNTIME_PATH)
endif()
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
+
+# OpenBSD policy requires that shared libraries be installed without
+# executable permission.
+set(CMAKE_INSTALL_SO_NO_EXE 1)
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index 58da8c56d..8a9d630f6 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -50,7 +50,7 @@ elseif(MSVC_CXX_ARCHITECTURE_ID)
elseif(MSVC_Fortran_ARCHITECTURE_ID)
set(_MACHINE_ARCH_FLAG "/machine:${MSVC_Fortran_ARCHITECTURE_ID}")
endif()
-set (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES ${_MACHINE_ARCH_FLAG}")
+set (CMAKE_EXE_LINKER_FLAGS_INIT "/INCREMENTAL:YES ${_MACHINE_ARCH_FLAG}")
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 32dd54631..5cbf9ee6b 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -165,7 +165,7 @@ set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
# executable linker flags
set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-# set the stack size and the machine type
+# set the machine type
set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
if(NOT _MACHINE_ARCH_FLAG)
set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
@@ -178,7 +178,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
endif()
endif()
set (CMAKE_EXE_LINKER_FLAGS_INIT
- "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
+ "${CMAKE_EXE_LINKER_FLAGS_INIT} /machine:${_MACHINE_ARCH_FLAG}")
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
# on versions that support it
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index e8166f4fc..f05a3d5f3 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -25,7 +25,11 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
endif()
-include_directories(${QT_INCLUDE_DIR})
+if(QT_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(${QT_INCLUDE_DIR})
+else(QT_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(SYSTEM ${QT_INCLUDE_DIR})
+endif(QT_INCLUDE_DIRS_NO_SYSTEM)
set(QT_LIBRARIES "")
set(QT_LIBRARIES_PLUGINS "")
@@ -89,7 +93,11 @@ foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
if(QT_USE_${module})
string(REPLACE "QT" "" qt_module_def "${module}")
add_definitions(-DQT_${qt_module_def}_LIB)
- include_directories(${QT_${module}_INCLUDE_DIR})
+ if(QT_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(${QT_${module}_INCLUDE_DIR})
+ else(QT_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(SYSTEM ${QT_${module}_INCLUDE_DIR})
+ endif(QT_INCLUDE_DIRS_NO_SYSTEM)
endif()
set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
diff --git a/Modules/WIX.template.in b/Modules/WIX.template.in
new file mode 100644
index 000000000..0bc7e10ce
--- /dev/null
+++ b/Modules/WIX.template.in
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ProductIcon.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 66f7c42aa..7808f2326 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -355,6 +355,8 @@ if (WIN32)
cmLocalVisualStudio7Generator.h
cmLocalVisualStudioGenerator.cxx
cmLocalVisualStudioGenerator.h
+ cmVisualStudioWCEPlatformParser.h
+ cmVisualStudioWCEPlatformParser.cxx
cmWin32ProcessExecution.cxx
cmWin32ProcessExecution.h
)
@@ -499,6 +501,14 @@ if(UNIX)
)
endif()
+if(WIN32)
+ set(CPACK_SRCS ${CPACK_SRCS}
+ CPack/WiX/cmCPackWIXGenerator.cxx
+ CPack/WiX/cmWIXSourceWriter.cxx
+ CPack/WiX/cmWIXRichTextFormatWriter.cxx
+ )
+endif()
+
if(APPLE)
set(CPACK_SRCS ${CPACK_SRCS}
CPack/cmCPackBundleGenerator.cxx
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 60514b70e..f77d17c3f 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 10)
-set(CMake_VERSION_TWEAK 20121124)
+set(CMake_VERSION_TWEAK 20130110)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
new file mode 100644
index 000000000..e8b0ea971
--- /dev/null
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -0,0 +1,571 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2012 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.
+============================================================================*/
+
+#include "cmCPackWIXGenerator.h"
+
+#include
+#include
+#include
+#include
+
+#include "cmWIXSourceWriter.h"
+#include "cmWIXRichTextFormatWriter.h"
+
+#include
+#include
+
+#include // for GUID generation
+
+int cmCPackWIXGenerator::InitializeInternal()
+{
+ componentPackageMethod = ONE_PACKAGE;
+
+ return this->Superclass::InitializeInternal();
+}
+
+bool cmCPackWIXGenerator::RunWiXCommand(const std::string& command)
+{
+ std::string cpackTopLevel;
+ if(!RequireOption("CPACK_TOPLEVEL_DIRECTORY", cpackTopLevel))
+ {
+ return false;
+ }
+
+ std::string logFileName = cpackTopLevel + "/wix.log";
+
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Running WiX command: " << command << std::endl);
+
+ std::string output;
+
+ int returnValue = 0;
+ bool status = cmSystemTools::RunSingleCommand(command.c_str(), &output,
+ &returnValue, 0, cmSystemTools::OUTPUT_NONE);
+
+ std::ofstream logFile(logFileName.c_str(), std::ios::app);
+ logFile << command << std::endl;
+ logFile << output;
+ logFile.close();
+
+ if(!status || returnValue)
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running WiX candle. "
+ "Please check '" << logFileName << "' for errors." << std::endl);
+
+ return false;
+ }
+
+ return true;
+}
+
+bool cmCPackWIXGenerator::RunCandleCommand(
+ const std::string& sourceFile, const std::string& objectFile)
+{
+ std::string executable;
+ if(!RequireOption("CPACK_WIX_CANDLE_EXECUTABLE", executable))
+ {
+ return false;
+ }
+
+ std::stringstream command;
+ command << QuotePath(executable);
+ command << " -nologo";
+ command << " -arch " << GetArchitecture();
+ command << " -out " << QuotePath(objectFile);
+ command << " " << QuotePath(sourceFile);
+
+ return RunWiXCommand(command.str());
+}
+
+bool cmCPackWIXGenerator::RunLightCommand(const std::string& objectFiles)
+{
+ std::string executable;
+ if(!RequireOption("CPACK_WIX_LIGHT_EXECUTABLE", executable))
+ {
+ return false;
+ }
+
+ std::stringstream command;
+ command << QuotePath(executable);
+ command << " -nologo";
+ command << " -out " << QuotePath(packageFileNames.at(0));
+ command << " -ext WixUIExtension";
+ command << " " << objectFiles;
+
+ return RunWiXCommand(command.str());
+}
+
+int cmCPackWIXGenerator::PackageFiles()
+{
+ if(!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag())
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Fatal WiX Generator Error" << std::endl);
+ return false;
+ }
+
+ return true;
+}
+
+bool cmCPackWIXGenerator::InitializeWiXConfiguration()
+{
+ if(!ReadListFile("CPackWIX.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while executing CPackWIX.cmake" << std::endl);
+ return false;
+ }
+
+ if(GetOption("CPACK_WIX_PRODUCT_GUID") == 0)
+ {
+ std::string guid = GenerateGUID();
+ SetOption("CPACK_WIX_PRODUCT_GUID", guid.c_str());
+
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "CPACK_WIX_PRODUCT_GUID implicitly set to " << guid << " . "
+ << std::endl);
+ }
+
+ if(GetOption("CPACK_WIX_UPGRADE_GUID") == 0)
+ {
+ std::string guid = GenerateGUID();
+ SetOption("CPACK_WIX_UPGRADE_GUID", guid.c_str());
+
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "CPACK_WIX_UPGRADE_GUID implicitly set to " << guid << " . "
+ "Please refer to the documentation on how and why "
+ "you might want to set this explicitly." << std::endl);
+ }
+
+ std::string cpackTopLevel;
+ if(!RequireOption("CPACK_TOPLEVEL_DIRECTORY", cpackTopLevel))
+ {
+ return false;
+ }
+
+ if(GetOption("CPACK_WIX_LICENSE_RTF") == 0)
+ {
+ std::string licenseFilename = cpackTopLevel + "/License.rtf";
+ SetOption("CPACK_WIX_LICENSE_RTF", licenseFilename.c_str());
+
+ if(!CreateLicenseFile())
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool cmCPackWIXGenerator::PackageFilesImpl()
+{
+ if(!InitializeWiXConfiguration())
+ {
+ return false;
+ }
+
+ if(!CreateWiXVariablesIncludeFile())
+ {
+ return false;
+ }
+
+ if(!CreateWiXSourceFiles())
+ {
+ return false;
+ }
+
+ std::stringstream objectFiles;
+ for(size_t i = 0; i < wixSources.size(); ++i)
+ {
+ const std::string& sourceFilename = wixSources[i];
+
+ std::string objectFilename =
+ cmSystemTools::GetFilenameWithoutExtension(sourceFilename) + ".wixobj";
+
+ if(!RunCandleCommand(sourceFilename, objectFilename))
+ {
+ return false;
+ }
+
+ objectFiles << " " << QuotePath(objectFilename);
+ }
+
+ return RunLightCommand(objectFiles.str());
+}
+
+bool cmCPackWIXGenerator::CreateWiXVariablesIncludeFile()
+{
+ std::string cpackTopLevel;
+ if(!RequireOption("CPACK_TOPLEVEL_DIRECTORY", cpackTopLevel))
+ {
+ return false;
+ }
+
+ std::string includeFilename =
+ cpackTopLevel + "/cpack_variables.wxi";
+
+ cmWIXSourceWriter includeFile(Logger, includeFilename, true);
+ CopyDefinition(includeFile, "CPACK_WIX_PRODUCT_GUID");
+ CopyDefinition(includeFile, "CPACK_WIX_UPGRADE_GUID");
+ CopyDefinition(includeFile, "CPACK_PACKAGE_VENDOR");
+ CopyDefinition(includeFile, "CPACK_PACKAGE_NAME");
+ CopyDefinition(includeFile, "CPACK_PACKAGE_VERSION");
+ CopyDefinition(includeFile, "CPACK_WIX_LICENSE_RTF");
+ CopyDefinition(includeFile, "CPACK_WIX_PRODUCT_ICON");
+ CopyDefinition(includeFile, "CPACK_WIX_UI_BANNER");
+ CopyDefinition(includeFile, "CPACK_WIX_UI_DIALOG");
+
+ return true;
+}
+
+void cmCPackWIXGenerator::CopyDefinition(
+ cmWIXSourceWriter &source, const std::string &name)
+{
+ const char* value = GetOption(name.c_str());
+ if(value)
+ {
+ AddDefinition(source, name, value);
+ }
+}
+
+void cmCPackWIXGenerator::AddDefinition(cmWIXSourceWriter& source,
+ const std::string& name, const std::string& value)
+{
+ std::stringstream tmp;
+ tmp << name << "=\"" << value << '"';
+
+ source.AddProcessingInstruction("define",
+ cmWIXSourceWriter::WindowsCodepageToUtf8(tmp.str()));
+}
+
+bool cmCPackWIXGenerator::CreateWiXSourceFiles()
+{
+ std::string cpackTopLevel;
+ if(!RequireOption("CPACK_TOPLEVEL_DIRECTORY", cpackTopLevel))
+ {
+ return false;
+ }
+
+ std::string directoryDefinitionsFilename =
+ cpackTopLevel + "/directories.wxs";
+
+ wixSources.push_back(directoryDefinitionsFilename);
+
+ cmWIXSourceWriter directoryDefinitions(Logger, directoryDefinitionsFilename);
+ directoryDefinitions.BeginElement("Fragment");
+
+ directoryDefinitions.BeginElement("Directory");
+ directoryDefinitions.AddAttribute("Id", "TARGETDIR");
+ directoryDefinitions.AddAttribute("Name", "SourceDir");
+
+ directoryDefinitions.BeginElement("Directory");
+ if(GetArchitecture() == "x86")
+ {
+ directoryDefinitions.AddAttribute("Id", "ProgramFilesFolder");
+ }
+ else
+ {
+ directoryDefinitions.AddAttribute("Id", "ProgramFiles64Folder");
+ }
+
+ std::vector install_root;
+
+ std::string tmp;
+ if(!RequireOption("CPACK_PACKAGE_INSTALL_DIRECTORY", tmp))
+ {
+ return false;
+ }
+
+ cmSystemTools::SplitPath(tmp.c_str(), install_root);
+
+ if(!install_root.empty() && install_root.back().empty())
+ {
+ install_root.pop_back();
+ }
+
+ for(size_t i = 1; i < install_root.size(); ++i)
+ {
+ directoryDefinitions.BeginElement("Directory");
+
+ if(i == install_root.size() - 1)
+ {
+ directoryDefinitions.AddAttribute("Id", "INSTALL_ROOT");
+ }
+ else
+ {
+ std::stringstream ss;
+ ss << "INSTALL_PREFIX_" << i;
+ directoryDefinitions.AddAttribute("Id", ss.str());
+ }
+
+ directoryDefinitions.AddAttribute("Name", install_root[i]);
+ }
+
+ size_t directoryCounter = 0;
+ size_t fileCounter = 0;
+
+ std::string fileDefinitionsFilename =
+ cpackTopLevel + "/files.wxs";
+
+ wixSources.push_back(fileDefinitionsFilename);
+
+ cmWIXSourceWriter fileDefinitions(Logger, fileDefinitionsFilename);
+ fileDefinitions.BeginElement("Fragment");
+
+ std::string featureDefinitionsFilename =
+ cpackTopLevel +"/features.wxs";
+
+ wixSources.push_back(featureDefinitionsFilename);
+
+ cmWIXSourceWriter featureDefinitions(Logger, featureDefinitionsFilename);
+ featureDefinitions.BeginElement("Fragment");
+
+ featureDefinitions.BeginElement("Feature");
+ featureDefinitions.AddAttribute("Id", "ProductFeature");
+ featureDefinitions.AddAttribute("Title", Name);
+ featureDefinitions.AddAttribute("Level", "1");
+ featureDefinitions.EndElement();
+
+ featureDefinitions.BeginElement("FeatureRef");
+ featureDefinitions.AddAttribute("Id", "ProductFeature");
+
+ AddDirectoryAndFileDefinitons(
+ toplevel, "INSTALL_ROOT",
+ directoryDefinitions, fileDefinitions, featureDefinitions,
+ directoryCounter, fileCounter);
+
+ featureDefinitions.EndElement();
+ featureDefinitions.EndElement();
+ fileDefinitions.EndElement();
+
+ for(size_t i = 1; i < install_root.size(); ++i)
+ {
+ directoryDefinitions.EndElement();
+ }
+
+ directoryDefinitions.EndElement();
+ directoryDefinitions.EndElement();
+ directoryDefinitions.EndElement();
+
+ std::string wixTemplate = FindTemplate("WIX.template.in");
+ if(wixTemplate.empty())
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Could not find CPack WiX template file WIX.template.in" << std::endl);
+ return false;
+ }
+
+ std::string mainSourceFilePath = cpackTopLevel + "/main.wxs";
+
+ if(!ConfigureFile(wixTemplate.c_str(), mainSourceFilePath .c_str()))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Failed creating '" << mainSourceFilePath <<
+ "'' from template." << std::endl);
+
+ return false;
+ }
+
+ wixSources.push_back(mainSourceFilePath);
+
+ return true;
+}
+
+bool cmCPackWIXGenerator::CreateLicenseFile()
+{
+ std::string licenseSourceFilename;
+ if(!RequireOption("CPACK_RESOURCE_FILE_LICENSE", licenseSourceFilename))
+ {
+ return false;
+ }
+
+ std::string licenseDestinationFilename;
+ if(!RequireOption("CPACK_WIX_LICENSE_RTF", licenseDestinationFilename))
+ {
+ return false;
+ }
+
+ std::string extension = GetRightmostExtension(licenseSourceFilename);
+
+ if(extension == ".rtf")
+ {
+ cmSystemTools::CopyAFile(
+ licenseSourceFilename.c_str(),
+ licenseDestinationFilename.c_str());
+ }
+ else if(extension == ".txt")
+ {
+ cmWIXRichTextFormatWriter rtfWriter(licenseDestinationFilename);
+
+ std::ifstream licenseSource(licenseSourceFilename.c_str());
+
+ std::string line;
+ while(std::getline(licenseSource, line))
+ {
+ rtfWriter.AddText(line);
+ rtfWriter.AddText("\n");
+ }
+ }
+ else
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "unsupported WiX License file extension '" <<
+ extension << "'" << std::endl);
+
+ return false;
+ }
+
+ return true;
+}
+
+void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
+ const std::string& topdir,
+ const std::string& directoryId,
+ cmWIXSourceWriter& directoryDefinitions,
+ cmWIXSourceWriter& fileDefinitions,
+ cmWIXSourceWriter& featureDefinitions,
+ size_t& directoryCounter,
+ size_t& fileCounter)
+{
+ cmsys::Directory dir;
+ dir.Load(topdir.c_str());
+
+ for(size_t i = 0; i < dir.GetNumberOfFiles(); ++i)
+ {
+ std::string fileName = dir.GetFile(static_cast(i));
+
+ if(fileName == "." || fileName == "..")
+ {
+ continue;
+ }
+
+ std::string fullPath = topdir + "/" + fileName;
+
+ if(cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ {
+ std::stringstream tmp;
+ tmp << "DIR_ID_" << ++directoryCounter;
+ std::string subDirectoryId = tmp.str();
+
+ directoryDefinitions.BeginElement("Directory");
+ directoryDefinitions.AddAttribute("Id", subDirectoryId);
+ directoryDefinitions.AddAttribute("Name", fileName);
+
+ AddDirectoryAndFileDefinitons(
+ fullPath, subDirectoryId,
+ directoryDefinitions,
+ fileDefinitions,
+ featureDefinitions,
+ directoryCounter,
+ fileCounter);
+
+ directoryDefinitions.EndElement();
+ }
+ else
+ {
+ std::stringstream tmp;
+ tmp << "_ID_" << ++fileCounter;
+ std::string idSuffix = tmp.str();
+
+ std::string componentId = std::string("CMP") + idSuffix;
+ std::string fileId = std::string("FILE") + idSuffix;
+
+ fileDefinitions.BeginElement("DirectoryRef");
+ fileDefinitions.AddAttribute("Id", directoryId);
+
+ fileDefinitions.BeginElement("Component");
+ fileDefinitions.AddAttribute("Id", componentId);
+ fileDefinitions.AddAttribute("Guid", "*");
+
+ fileDefinitions.BeginElement("File");
+ fileDefinitions.AddAttribute("Id", fileId);
+ fileDefinitions.AddAttribute("Source", fullPath);
+ fileDefinitions.AddAttribute("KeyPath", "yes");
+
+ fileDefinitions.EndElement();
+ fileDefinitions.EndElement();
+ fileDefinitions.EndElement();
+
+ featureDefinitions.BeginElement("ComponentRef");
+ featureDefinitions.AddAttribute("Id", componentId);
+ featureDefinitions.EndElement();
+ }
+ }
+}
+
+bool cmCPackWIXGenerator::RequireOption(
+ const std::string& name, std::string &value) const
+{
+ const char* tmp = GetOption(name.c_str());
+ if(tmp)
+ {
+ value = tmp;
+
+ return true;
+ }
+ else
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Required variable " << name << " not set" << std::endl);
+
+ return false;
+ }
+}
+
+std::string cmCPackWIXGenerator::GetArchitecture() const
+{
+ std::string void_p_size;
+ RequireOption("CPACK_WIX_SIZEOF_VOID_P", void_p_size);
+
+ if(void_p_size == "8")
+ {
+ return "x64";
+ }
+ else
+ {
+ return "x86";
+ }
+}
+
+std::string cmCPackWIXGenerator::GenerateGUID()
+{
+ UUID guid;
+ UuidCreate(&guid);
+
+ unsigned char *tmp = 0;
+ UuidToString(&guid, &tmp);
+
+ std::string result(reinterpret_cast(tmp));
+ RpcStringFree(&tmp);
+
+ return cmSystemTools::UpperCase(result);
+}
+
+std::string cmCPackWIXGenerator::QuotePath(const std::string& path)
+{
+ return std::string("\"") + path + '"';
+}
+
+std::string cmCPackWIXGenerator::GetRightmostExtension(
+ const std::string& filename)
+{
+ std::string extension;
+
+ std::string::size_type i = filename.rfind(".");
+ if(i != std::string::npos)
+ {
+ extension = filename.substr(i);
+ }
+
+ return cmSystemTools::LowerCase(extension);
+}
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
new file mode 100644
index 000000000..0e95d70f6
--- /dev/null
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -0,0 +1,101 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2012 Kitware, Inc.
+
+ 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.
+============================================================================*/
+
+#ifndef cmCPackWIXGenerator_h
+#define cmCPackWIXGenerator_h
+
+#include
+
+#include
+#include