aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtcreatorplugin.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-11-01 18:51:20 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-11-03 17:47:41 +0100
commit9532d4a345c1928c79f8aa0013e1e9dda37a6c70 (patch)
tree5b13f219c14cf2cf4a941f83056089a1f6e01115 /src/qtcreatorplugin.pri
parente160f071ce16dc46fdeaa03b985fe8d44fb58608 (diff)
dynamically replace creator version during build
... instead of running a sed script over a lot of files on each version increment.
Diffstat (limited to 'src/qtcreatorplugin.pri')
-rw-r--r--src/qtcreatorplugin.pri23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index fc7b40ef07..2b98eb9e3d 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -17,17 +17,30 @@ isEmpty(TARGET) {
error("qtcreatorplugin.pri: You must provide a TARGET")
}
-PLUGINSPECS = $${_PRO_FILE_PWD_}/$${TARGET}.pluginspec
-copy2build.input = PLUGINSPECS
-copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
+defineReplace(stripOutDir) {
+ 1 ~= s|^$$re_escape($$OUT_PWD/)||$$i_flag
+ return($$1)
+}
+
+PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
+PLUGINSPEC_IN = $${PLUGINSPEC}.in
+exists($$PLUGINSPEC_IN) {
+ OTHER_FILES += $$PLUGINSPEC_IN
+ PLUGINSPEC = $$OUT_PWD/$${TARGET}.pluginspec
+ QMAKE_SUBSTITUTES += $${PLUGINSPEC}.in
+ copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripOutDir}
+} else {
+ # need to support that for external plugins
+ OTHER_FILES += $$PLUGINSPEC
+ copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
+}
+copy2build.input = PLUGINSPEC
isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += copy2build
-OTHER_FILES += $$PLUGINSPECS
-
macx {
!isEmpty(TIGER_COMPAT_MODE) {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/