From 5aa349628e2d4913e5aeddd6557d578f34e31fc0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 17 Apr 2013 14:55:36 +0200 Subject: Handle usr-move without forcing absolute paths In qtbase commit 7ac58d1ff0815566ba1de09519299b5119e5ee91 (Make cmake packages installed to /usr non-relocatable., 2013-02-11), we made cmake config files non-relocatable if they were installed to the /usr prefix. That was assumed to mean that this was a distro or platform package, and was a workaround for the usr-move problem on Fedora and ArchLinux. However, cmake bug http://public.kitware.com/Bug/view.php?id=14041 showed that forcing absolute paths in this situation is not desirable in cross compiling scenarios. CMake commit 6c613b433c45efb0bb013a6bd668cbb8ac740259 (Handle usr-move without forcing absolute paths (#14041), 2013-04-03) addressed the problem in CMake, and this commit is an equivalent. Change-Id: I065a6230bc618aa980fae6ca511ae10df4cd62c2 Reviewed-by: Stephen Kelly --- mkspecs/features/cmake_functions.prf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mkspecs/features/cmake_functions.prf') diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index 62634d9b88..5816dfe1d0 100644 --- a/mkspecs/features/cmake_functions.prf +++ b/mkspecs/features/cmake_functions.prf @@ -24,3 +24,10 @@ defineReplace(cmakeModuleList) { } return ($$join(out, ";")) } + +defineReplace(cmakeTargetPath) { + SYSR = $$[QT_SYSROOT] + !isEmpty(SYSR): path = $$relative_path($$1, $$[QT_SYSROOT]) + else: path = $$1 + return(/$$path) +} -- cgit v1.2.3