Commit ec0ee954 authored by Ben Boeckel's avatar Ben Boeckel

qthelp: avoid CMP0053 warnings with @ variables

Change-Id: I1af1067687308f8a6c2f462292047f4b8395232d
parent 7f649af8
......@@ -363,6 +363,7 @@ function(build_help_project name)
# generate the toc at run-time.
COMMAND ${CMAKE_COMMAND}
-Dinput_file:FILEPATH=${CMAKE_SOURCE_DIR}/CMake/qt_help.qhp.in
-Doutput_file:FILEPATH=${qhp_filename}
-Dfile_patterns:STRING="${arg_FILEPATTERNS}"
-Dnamespace:STRING="${arg_NAMESPACE}"
......
......@@ -2,6 +2,7 @@
# The WORKING_DIRECTORY for this script must be the same as the location for the
# qhp file otherwise the toc won't be generated correctly.
# Input environment:
# input_file :-
# output_file :-
# file_patterns :-
# namespace :-
......@@ -20,22 +21,6 @@ function (extract_title name filename)
endif()
endfunction()
set (qhp_contents
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<QtHelpProject version=\"1.0\">
<namespace>@namespace@</namespace>
<virtualFolder>@folder@</virtualFolder>
<filterSection>
@toc@
<keywords>
<!-- how to handle keywords? -->
</keywords>
<files>
@files@
</files>
</filterSection>
</QtHelpProject>")
if (NOT output_file OR NOT file_patterns OR NOT namespace OR NOT folder OR NOT name)
message(FATAL_ERROR "Missing one of the required arguments!!")
endif ()
......@@ -75,5 +60,7 @@ foreach(filename ${file_patterns})
set (files "${files}<file>${filename}</file>\n")
endforeach()
string(CONFIGURE "${qhp_contents}" text @ONLY)
file (WRITE "${output_file}" "${text}")
configure_file(
"${input_file}"
"${output_file}"
@ONLY)
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<QtHelpProject version=\"1.0\">
<namespace>@namespace@</namespace>
<virtualFolder>@folder@</virtualFolder>
<filterSection>
@toc@
<keywords>
<!-- how to handle keywords? -->
</keywords>
<files>
@files@
</files>
</filterSection>
</QtHelpProject>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment