summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/cpackifw-i18n.rst7
-rw-r--r--Modules/CMakeCSharpInformation.cmake22
-rw-r--r--Modules/CPackIFW.cmake46
-rw-r--r--Modules/Compiler/GNU-FindBinUtils.cmake12
-rw-r--r--Modules/FindDevIL.cmake4
-rw-r--r--Modules/FindOpenSSL.cmake4
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake4
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/IFW/cmCPackIFWCommon.cxx46
-rw-r--r--Source/CPack/IFW/cmCPackIFWCommon.h16
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx50
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.h5
-rw-r--r--Source/cmFileCommand.cxx4
-rwxr-xr-xbootstrap1
14 files changed, 179 insertions, 44 deletions
diff --git a/Help/release/dev/cpackifw-i18n.rst b/Help/release/dev/cpackifw-i18n.rst
new file mode 100644
index 0000000..59327fe
--- /dev/null
+++ b/Help/release/dev/cpackifw-i18n.rst
@@ -0,0 +1,7 @@
+cpackifw-i18n
+-------------
+
+* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and
+ :command:`cpack_ifw_configure_component_group` commands gained a
+ internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` options
+ to more specific configuration.
diff --git a/Modules/CMakeCSharpInformation.cmake b/Modules/CMakeCSharpInformation.cmake
index dc775bd..cd86016 100644
--- a/Modules/CMakeCSharpInformation.cmake
+++ b/Modules/CMakeCSharpInformation.cmake
@@ -68,38 +68,38 @@ if(CMAKE_CSharp_STANDARD_LIBRARIES_INIT)
mark_as_advanced(CMAKE_CSharp_STANDARD_LIBRARIES)
endif()
-# set missing flags (if they do not exist). This is needed in the
+# set missing flags (if they are not defined). This is needed in the
# unlikely case that you have only C# and no C/C++ targets in your
# project.
-if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS)
+if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS)
set(CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_DEBUG)
+if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_DEBUG)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_RELEASE)
+if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_RELEASE)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL)
+if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL)
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO)
+if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO)
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS)
set(CMAKE_EXE_LINKER_FLAGS "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_DEBUG)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_DEBUG)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_RELEASE)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_RELEASE)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_MINSIZEREL)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_MINSIZEREL)
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
endif()
-if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO)
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
endif()
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index b4a6dc6..c1cb52f 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -55,6 +55,33 @@
# The :variable:`CPACK_IFW_ROOT` variable has a higher priority and overrides
# the value of the :variable:`QTIFWDIR` variable.
#
+# Internationalization
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# Some variables and command arguments support internationalization via
+# CMake script. This is an optional feature.
+#
+# Installers created by QtIFW_ tools have built-in support for
+# internationalization and many phrases are localized to many languages,
+# but this does not apply to the description of the your components and groups
+# that will be distributed.
+#
+# Localization of the description of your components and groups is useful for
+# users of your installers.
+#
+# A localized variable or argument can contain a single default value, and a
+# set of pairs the name of the locale and the localized value.
+#
+# For example:
+#
+# .. code-block:: cmake
+#
+# set(LOCALIZABLE_VARIABLE "Default value"
+# en "English value"
+# en_US "American value"
+# en_GB "Great Britain value"
+# )
+#
# Variables
# ^^^^^^^^^
#
@@ -265,8 +292,8 @@
# cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL] [VIRTUAL]
# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
-# [DISPLAY_NAME <display_name>]
-# [DESCRIPTION <description>]
+# [DISPLAY_NAME <display_name>] # Note: Internationalization supported
+# [DESCRIPTION <description>] # Note: Internationalization supported
# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
@@ -368,8 +395,8 @@
# cpack_ifw_configure_component_group(<groupname> [VIRTUAL]
# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
-# [DISPLAY_NAME <display_name>]
-# [DESCRIPTION <description>]
+# [DISPLAY_NAME <display_name>] # Note: Internationalization supported
+# [DESCRIPTION <description>] # Note: Internationalization supported
# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
@@ -546,8 +573,9 @@
#
# cpack_add_component(myapp
# DISPLAY_NAME "MyApp"
-# DESCRIPTION "My Application")
+# DESCRIPTION "My Application") # Default description
# cpack_ifw_configure_component(myapp
+# DESCRIPTION ru_RU "Мое Приложение" # Localized description
# VERSION "1.2.3" # Version of component
# SCRIPT "operations.qs")
# cpack_add_component(mybigplugin
@@ -835,8 +863,8 @@ macro(cpack_ifw_configure_component compname)
string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
set(_IFW_OPT COMMON ESSENTIAL VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
- set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
+ set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_SCRIPT)
@@ -876,8 +904,8 @@ macro(cpack_ifw_configure_component_group grpname)
string(TOUPPER ${grpname} _CPACK_IFWGRP_UNAME)
set(_IFW_OPT VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
- set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
+ set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_SCRIPT)
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake
index 1aa0219..142636c 100644
--- a/Modules/Compiler/GNU-FindBinUtils.cmake
+++ b/Modules/Compiler/GNU-FindBinUtils.cmake
@@ -2,6 +2,12 @@ if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL
message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
endif()
+# Ubuntu 16.04:
+# * /usr/bin/gcc-ar-5
+# * /usr/bin/gcc-ranlib-5
+string(REGEX MATCH "^([0-9]+)" __version_x
+ "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
+
string(REGEX MATCH "^([0-9]+\\.[0-9]+)" __version_x_y
"${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
@@ -10,16 +16,18 @@ get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPIL
# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ar.1.html
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES
- "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
HINTS ${__gcc_hints}
DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
)
# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES
- "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
HINTS ${__gcc_hints}
DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
)
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index 4b868a2..f6c8e3f 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -25,7 +25,7 @@
# library interfaces with OpenGL. It is not strictly needed
# in applications.
# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files.
-# IL_FOUND - this is set to TRUE if all the above variables were set.
+# DevIL_FOUND - this is set to TRUE if all the above variables were set.
# This will be set to false if ILU or ILUT are not found,
# even if they are not needed. In most systems, if one
# library is found all the others are as well. That's the
@@ -70,3 +70,5 @@ find_library(ILU_LIBRARIES
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DevIL DEFAULT_MSG
IL_LIBRARIES ILU_LIBRARIES
IL_INCLUDE_DIR)
+# provide legacy variable for compatiblity
+set(IL_FOUND ${DevIL_FOUND})
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 1209560..f32eb50 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -376,7 +376,7 @@ set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
if (OPENSSL_VERSION)
find_package_handle_standard_args(OpenSSL
REQUIRED_VARS
- OPENSSL_SSL_LIBRARY
+ #OPENSSL_SSL_LIBRARY # FIXME: require based on a component request?
OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR
VERSION_VAR
@@ -386,7 +386,7 @@ if (OPENSSL_VERSION)
)
else ()
find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
- OPENSSL_SSL_LIBRARY
+ #OPENSSL_SSL_LIBRARY # FIXME: require based on a component request?
OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR
)
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index b77925d..b851a90 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -147,7 +147,7 @@ endmacro()
macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
if(${_NAME}_CONFIG)
- _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+ _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing:${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
else()
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
# List them all in the error message:
@@ -374,7 +374,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
if(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
else()
- _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+ _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}")
endif()
endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index dea8b6d..c3bee5b 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 8)
-set(CMake_VERSION_PATCH 20170515)
+set(CMake_VERSION_PATCH 20170516)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/IFW/cmCPackIFWCommon.cxx b/Source/CPack/IFW/cmCPackIFWCommon.cxx
index 436f4d3..e8f05bd 100644
--- a/Source/CPack/IFW/cmCPackIFWCommon.cxx
+++ b/Source/CPack/IFW/cmCPackIFWCommon.cxx
@@ -11,6 +11,8 @@
#include "cmXMLWriter.h"
#include <sstream>
+#include <utility>
+#include <vector>
cmCPackIFWCommon::cmCPackIFWCommon()
: Generator(CM_NULLPTR)
@@ -72,6 +74,50 @@ bool cmCPackIFWCommon::IsVersionEqual(const char* version)
version);
}
+void cmCPackIFWCommon::ExpandListArgument(
+ const std::string& arg, std::map<std::string, std::string>& argsOut)
+{
+ std::vector<std::string> args;
+ cmSystemTools::ExpandListArgument(arg, args, false);
+ if (args.empty()) {
+ return;
+ }
+
+ std::size_t i = 0;
+ std::size_t c = args.size();
+ if (c % 2) {
+ argsOut[""] = args[i];
+ ++i;
+ }
+
+ --c;
+ for (; i < c; i += 2) {
+ argsOut[args[i]] = args[i + 1];
+ }
+}
+
+void cmCPackIFWCommon::ExpandListArgument(
+ const std::string& arg, std::multimap<std::string, std::string>& argsOut)
+{
+ std::vector<std::string> args;
+ cmSystemTools::ExpandListArgument(arg, args, false);
+ if (args.empty()) {
+ return;
+ }
+
+ std::size_t i = 0;
+ std::size_t c = args.size();
+ if (c % 2) {
+ argsOut.insert(std::pair<std::string, std::string>("", args[i]));
+ ++i;
+ }
+
+ --c;
+ for (; i < c; i += 2) {
+ argsOut.insert(std::pair<std::string, std::string>(args[i], args[i + 1]));
+ }
+}
+
void cmCPackIFWCommon::WriteGeneratedByToStrim(cmXMLWriter& xout)
{
if (!this->Generator) {
diff --git a/Source/CPack/IFW/cmCPackIFWCommon.h b/Source/CPack/IFW/cmCPackIFWCommon.h
index 66b6e89..354d849 100644
--- a/Source/CPack/IFW/cmCPackIFWCommon.h
+++ b/Source/CPack/IFW/cmCPackIFWCommon.h
@@ -5,6 +5,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <map>
#include <string>
class cmCPackIFWGenerator;
@@ -46,6 +47,21 @@ public:
*/
bool IsVersionEqual(const char* version);
+ /** Expand the list argument containing the map of the key-value pairs.
+ * If the number of elements is odd, then the first value is used as the
+ * default value with an empty key.
+ * Any values with the same keys will be permanently overwritten.
+ */
+ static void ExpandListArgument(const std::string& arg,
+ std::map<std::string, std::string>& argsOut);
+
+ /** Expand the list argument containing the multimap of the key-value pairs.
+ * If the number of elements is odd, then the first value is used as the
+ * default value with an empty key.
+ */
+ static void ExpandListArgument(
+ const std::string& arg, std::multimap<std::string, std::string>& argsOut);
+
cmCPackIFWGenerator* Generator;
protected:
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index e6ef421..c5311c3 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -15,6 +15,7 @@
#include <map>
#include <sstream>
#include <stddef.h>
+#include <utility>
//---------------------------------------------------------- CompareStruct ---
cmCPackIFWPackage::CompareStruct::CompareStruct()
@@ -108,8 +109,8 @@ std::string cmCPackIFWPackage::GetComponentName(cmCPackComponent* component)
void cmCPackIFWPackage::DefaultConfiguration()
{
- this->DisplayName = "";
- this->Description = "";
+ this->DisplayName.clear();
+ this->Description.clear();
this->Version = "";
this->ReleaseDate = "";
this->Script = "";
@@ -136,17 +137,17 @@ int cmCPackIFWPackage::ConfigureFromOptions()
// Display name
if (const char* option = this->GetOption("CPACK_PACKAGE_NAME")) {
- this->DisplayName = option;
+ this->DisplayName[""] = option;
} else {
- this->DisplayName = "Your package";
+ this->DisplayName[""] = "Your package";
}
// Description
if (const char* option =
this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) {
- this->Description = option;
+ this->Description[""] = option;
} else {
- this->Description = "Your package description";
+ this->Description[""] = "Your package description";
}
// Version
@@ -174,10 +175,10 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
cmsys::SystemTools::UpperCase(component->Name) + "_";
// Display name
- this->DisplayName = component->DisplayName;
+ this->DisplayName[""] = component->DisplayName;
// Description
- this->Description = component->Description;
+ this->Description[""] = component->Description;
// Version
if (const char* optVERSION = this->GetOption(prefix + "VERSION")) {
@@ -262,8 +263,8 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
std::string prefix = "CPACK_IFW_COMPONENT_GROUP_" +
cmsys::SystemTools::UpperCase(group->Name) + "_";
- this->DisplayName = group->DisplayName;
- this->Description = group->Description;
+ this->DisplayName[""] = group->DisplayName;
+ this->Description[""] = group->Description;
// Version
if (const char* optVERSION = this->GetOption(prefix + "VERSION")) {
@@ -358,7 +359,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
if (this->IsSetToEmpty(option)) {
this->DisplayName.clear();
} else if (const char* value = this->GetOption(option)) {
- this->DisplayName = value;
+ this->ExpandListArgument(value, this->DisplayName);
}
// Description
@@ -366,7 +367,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
if (this->IsSetToEmpty(option)) {
this->Description.clear();
} else if (const char* value = this->GetOption(option)) {
- this->Description = value;
+ this->ExpandListArgument(value, this->Description);
}
// Release date
@@ -519,8 +520,29 @@ void cmCPackIFWPackage::GeneratePackageFile()
xout.StartElement("Package");
- xout.Element("DisplayName", this->DisplayName);
- xout.Element("Description", this->Description);
+ // DisplayName (with translations)
+ for (std::map<std::string, std::string>::iterator it =
+ this->DisplayName.begin();
+ it != this->DisplayName.end(); ++it) {
+ xout.StartElement("DisplayName");
+ if (!it->first.empty()) {
+ xout.Attribute("xml:lang", it->first);
+ }
+ xout.Content(it->second);
+ xout.EndElement();
+ }
+
+ // Description (with translations)
+ for (std::map<std::string, std::string>::iterator it =
+ this->Description.begin();
+ it != this->Description.end(); ++it) {
+ xout.StartElement("Description");
+ if (!it->first.empty()) {
+ xout.Attribute("xml:lang", it->first);
+ }
+ xout.Content(it->second);
+ xout.EndElement();
+ }
// Update text
if (!this->UpdateText.empty()) {
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h
index f9e577a..cec59b0 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.h
+++ b/Source/CPack/IFW/cmCPackIFWPackage.h
@@ -7,6 +7,7 @@
#include "cmCPackIFWCommon.h"
+#include <map>
#include <set>
#include <string>
#include <vector>
@@ -69,10 +70,10 @@ public:
// Configuration
/// Human-readable name of the component
- std::string DisplayName;
+ std::map<std::string, std::string> DisplayName;
/// Human-readable description of the component
- std::string Description;
+ std::map<std::string, std::string> Description;
/// Version number of the component
std::string Version;
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 2c25e9b..ff6e2b7 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -44,6 +44,10 @@
#include "cmELF.h"
#endif
+#if defined(_WIN32)
+#include <windows.h>
+#endif
+
class cmSystemToolsFileTime;
// Table of permissions flags.
diff --git a/bootstrap b/bootstrap
index 70da70e..e491cd8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1428,6 +1428,7 @@ fi
cmake_c_flags_String="-DKWSYS_STRING_C"
if ${cmake_system_mingw}; then
cmake_c_flags_EncodingC="-DKWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP"
+ cmake_cxx_flags_EncodingCXX="${cmake_c_flags_EncodingC}"
cmake_cxx_flags_cmProcessOutput="${cmake_c_flags_EncodingC}"
fi
cmake_cxx_flags_SystemTools="