Commit 6706df97 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

use new qmake functions under qt5

waaaay faster than the hand-crafted ones

Change-Id: Ia4f60207b26a01752ca1eeddf1d8a76381cd1710
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent d472a663
......@@ -3,6 +3,18 @@ QTCREATOR_PRI_INCLUDED = 1
QTCREATOR_VERSION = 2.5.83
isEqual(QT_MAJOR_VERSION, 5) {
defineReplace(cleanPath) {
return($$clean_path($$1))
}
defineReplace(targetPath) {
return($$shell_path($$1))
}
} else { # qt5
defineReplace(cleanPath) {
win32:1 ~= s|\\\\|/|g
contains(1, ^/.*):pfx = /
......@@ -20,6 +32,8 @@ defineReplace(targetPath) {
return($$replace(1, /, $$QMAKE_DIR_SEP))
}
} # qt5
defineReplace(qtLibraryName) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
......@@ -56,6 +70,15 @@ defineTest(minQtVersion) {
return(false)
}
isEqual(QT_MAJOR_VERSION, 5) {
# For use in custom compilers which just copy files
defineReplace(stripSrcDir) {
return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
}
} else { # qt5
# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
......@@ -69,6 +92,8 @@ defineReplace(stripSrcDir) {
return($$out)
}
} # qt5
isEmpty(TEST):CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
TEST = 1
......
......@@ -33,11 +33,21 @@ isEmpty(TARGET) {
error("qtcreatorplugin.pri: You must provide a TARGET")
}
isEqual(QT_MAJOR_VERSION, 5) {
defineReplace(stripOutDir) {
return($$relative_path($$1, $$OUT_PWD))
}
} else { # qt5
defineReplace(stripOutDir) {
1 ~= s|^$$re_escape($$OUT_PWD/)||$$i_flag
return($$1)
}
} # qt5
PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
PLUGINSPEC_IN = $${PLUGINSPEC}.in
exists($$PLUGINSPEC_IN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment