summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/cmake_functions.prf
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-04-17 14:55:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-19 12:03:36 +0200
commit5aa349628e2d4913e5aeddd6557d578f34e31fc0 (patch)
tree0f6eb6c82593d33df489d9a48371b871392d8f39 /mkspecs/features/cmake_functions.prf
parent5ea3845bd0bf4dec9828270ab18e7c94d596975e (diff)
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 <stephen.kelly@kdab.com>
Diffstat (limited to 'mkspecs/features/cmake_functions.prf')
-rw-r--r--mkspecs/features/cmake_functions.prf7
1 files changed, 7 insertions, 0 deletions
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)
+}