From bb1e5675a5628b72edd32b975e78b7feba366ff9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Feb 2017 12:12:28 -0500 Subject: 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 --- src/corelib/Qt5ModuleLocationForInstall.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/corelib/Qt5ModuleLocationForInstall.cmake.in') 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) -- cgit v1.2.3