diff options
authorBen Boeckel <>2017-02-09 12:12:28 -0500
committerAndré Klitzing <>2017-07-10 21:25:47 +0000
commitbb1e5675a5628b72edd32b975e78b7feba366ff9 (patch)
parentc3cd0f6e192da887d62db8ff78e567d8522e4d58 (diff)
cmake: avoid `@var@` expansion in older CMake versions
Older versions of CMake expanded `@var@` in CMake code, so this could be expanded at this location rather than the `string(CONFIGURE)` call if `module` were set inadvertently. Instead, hide the literal `@` symbol from CMake, but not from the string. This avoids a CMP0053 warning for projects using Qt5 with a minimum version set lower than 3.1 and silent bugs with projects explicitly setting CMP0053 to OLD. Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca Reviewed-by: Stephen Kelly <> Reviewed-by: Oswald Buddenhagen <>
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/ b/src/corelib/
index e401b1fe34..8751e4acbc 100644
--- a/src/corelib/
+++ b/src/corelib/
@@ -1,4 +1,6 @@
set(_qt5_root_dir ${_qt5_install_prefix})
set(_qt5_module_paths ${_qt5_install_prefix})
-set(_qt5_module_location_template ${_qt5_install_prefix}/Qt5@module@/Qt5@module@Config.cmake)
+set(_qt5_at "@")
+set(_qt5_module_location_template ${_qt5_install_prefix}/Qt5${_qt5_at}module${_qt5_at}/Qt5${_qt5_at}module${_qt5_at}Config.cmake)