summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5ModuleLocationForInstall.cmake.in
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-02-09 12:12:28 -0500
committerAndré Klitzing <aklitzing@gmail.com>2017-07-10 21:25:47 +0000
commitbb1e5675a5628b72edd32b975e78b7feba366ff9 (patch)
tree47218c0f3c7f867ae9487b229b469323758a2eea /src/corelib/Qt5ModuleLocationForInstall.cmake.in
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 <steveire@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/Qt5ModuleLocationForInstall.cmake.in')
-rw-r--r--src/corelib/Qt5ModuleLocationForInstall.cmake.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/Qt5ModuleLocationForInstall.cmake.in b/src/corelib/Qt5ModuleLocationForInstall.cmake.in
index e401b1fe34..8751e4acbc 100644
--- a/src/corelib/Qt5ModuleLocationForInstall.cmake.in
+++ b/src/corelib/Qt5ModuleLocationForInstall.cmake.in
@@ -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)
+unset(_qt5_at)