This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via d3c7c8008643475c656562837bf3c072e57ef799 (commit) via 6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 (commit) from e80f026bd36fbfe70b0d88caa81bed429ca81b11 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3c7c8008643475c656562837bf3c072e57ef799 commit d3c7c8008643475c656562837bf3c072e57ef799 Merge: e80f026 6310f7c Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Jan 11 13:25:59 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Jan 11 13:25:59 2017 -0500 Merge topic 'add-cpack-ifw-configure-file' into next 6310f7c3 Add cpack_ifw_configure_file command https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 commit 6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 Author: Konstantin Podsvirov <konstan...@podsvirov.pro> AuthorDate: Tue Dec 13 02:01:14 2016 +0300 Commit: Konstantin Podsvirov <konstan...@podsvirov.pro> CommitDate: Wed Jan 11 13:56:45 2017 +0300 Add cpack_ifw_configure_file command diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 015e36e..d4712ba 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -59,6 +59,7 @@ All Modules /module/CPackDeb /module/CPackDMG /module/CPackIFW + /module/CPackIFWConfigureFile /module/CPackNSIS /module/CPackPackageMaker /module/CPackProductBuild diff --git a/Help/module/CPackIFWConfigureFile.rst b/Help/module/CPackIFWConfigureFile.rst new file mode 100644 index 0000000..e88517c --- /dev/null +++ b/Help/module/CPackIFWConfigureFile.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/CPackIFWConfigureFile.cmake diff --git a/Help/release/dev/cpack-ifw-configure-file.rst b/Help/release/dev/cpack-ifw-configure-file.rst new file mode 100644 index 0000000..c9a1220 --- /dev/null +++ b/Help/release/dev/cpack-ifw-configure-file.rst @@ -0,0 +1,9 @@ +cpack-ifw-configure-file +------------------------ + +* The :command:`cpack_ifw_configure_file` command was added + (in :module:`CPackIFWConfigureFile`) to configure file templates prepared + in QtIFW/SDK/Creator style. + +* The :module:`CPackIFWConfigureFile` module was added to define + :command:`cpack_ifw_configure_file` command. diff --git a/Modules/CPackIFWConfigureFile.cmake b/Modules/CPackIFWConfigureFile.cmake new file mode 100644 index 0000000..790574a --- /dev/null +++ b/Modules/CPackIFWConfigureFile.cmake @@ -0,0 +1,65 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# CPackIFWConfigureFile +# --------------------- +# +# The module defines :command:`configure_file` similar command to +# configure file templates prepared in QtIFW/SDK/Creator style. +# +# +# Commands +# ^^^^^^^^ +# +# The module defines the following commands: +# +# .. command:: cpack_ifw_configure_file +# +# Copy a file to another location and modify its contents. +# +# :: +# +# cpack_ifw_configure_file(<input> <output>) +# +# Copies an ``<input>`` file to an ``<output>`` file and substitutes variable +# values referenced as ``%{VAR}`` or ``%VAR%`` in the input file content. +# Each variable reference will be replaced with the current value of the +# variable, or the empty string if the variable is not defined. +# + +# NOTE: This file used to himself packaging via CPack IFW generator and +# should be compatible with minimal CMake version defined in +# ../CMakeLists.txt file. + +if(NOT DEFINED CPackIFWConfigureFile_CMake_INCLUDED) +set(CPackIFWConfigureFile_CMake_INCLUDED 1) + +macro(cpack_ifw_configure_file INPUT OUTPUT) + file(READ "${INPUT}" _tmp) + foreach(_tmp_regex "%{([^%}]+)}" "%([^%]+)%") + string(REGEX MATCHALL "${_tmp_regex}" _tmp_vars "${_tmp}") + while(_tmp_vars) + foreach(_tmp_var ${_tmp_vars}) + string(REGEX REPLACE "${_tmp_regex}" "\\1" + _tmp_var_name "${_tmp_var}") + if(DEFINED ${_tmp_var_name}) + set(_tmp_var_value "${${_tmp_var_name}}") + elseif(NOT "$ENV{${_tmp_var_name}}" STREQUAL "") + set(_tmp_var_value "$ENV{${_tmp_var_name}}") + else() + set(_tmp_var_value "") + endif() + string(REPLACE "${_tmp_var}" "${_tmp_var_value}" _tmp "${_tmp}") + endforeach() + string(REGEX MATCHALL "${_tmp_regex}" _tmp_vars "${_tmp}") + endwhile() + endforeach() + if(IS_ABSOLUTE "${OUTPUT}") + file(WRITE "${OUTPUT}" "${_tmp}") + else() + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}" "${_tmp}") + endif() +endmacro() + +endif() # NOT DEFINED CPackIFWConfigureFile_CMake_INCLUDED ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/CPackIFWConfigureFile.rst | 1 + Help/release/dev/cpack-ifw-configure-file.rst | 9 ++++ Modules/CPackIFWConfigureFile.cmake | 65 +++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 Help/module/CPackIFWConfigureFile.rst create mode 100644 Help/release/dev/cpack-ifw-configure-file.rst create mode 100644 Modules/CPackIFWConfigureFile.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits