summaryrefslogtreecommitdiffstats
path: root/translations/translations.pro
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-15 12:19:57 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-15 13:14:22 (GMT)
commitc185a351d7b72812b5f93163ee43edd73784522c (patch)
tree620d0eaeeb29694be5e840c21adae7ae69822a07 /translations/translations.pro
parente4c224f0ef1b57a1389148b78d236349603503a5 (diff)
downloadQt-c185a351d7b72812b5f93163ee43edd73784522c.zip
Qt-c185a351d7b72812b5f93163ee43edd73784522c.tar.gz
Qt-c185a351d7b72812b5f93163ee43edd73784522c.tar.bz2
make qm target work when the freshly built Qt is not in the library
search path unlike moc and uic, lrelease is not statically built, so when building without RPATH, we need to ensure that our libraries are found first. Reviewed-by: mariusSO
Diffstat (limited to 'translations/translations.pro')
-rw-r--r--translations/translations.pro13
1 files changed, 11 insertions, 2 deletions
diff --git a/translations/translations.pro b/translations/translations.pro
index d1962fe..6f14108 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -1,7 +1,16 @@
TRANSLATIONS = $$files(*.ts)
LRELEASE = $$QT_BUILD_TREE/bin/lrelease
-win32:LRELEASE ~= s|/|\|g
+win32 {
+ LRELEASE ~= s|/|\|g
+} else:!static {
+ path = $$QT_BUILD_TREE/lib
+ !macx:var = LD_LIBRARY_PATH
+ else:qt_no_framework:var = DYLD_LIBRARY_PATH
+ else:var = DYLD_FRAMEWORK_PATH
+
+ LRELEASE = test -z \"\$\$$$var\" && $$var=$$path || $$var=$$path:\$\$$$var; export $$var; $$LRELEASE
+}
contains(TEMPLATE_PREFIX, vc):vcproj = 1
@@ -14,7 +23,7 @@ LIBS =
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_BASE}.qm
isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
-updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+updateqm.commands = @echo lrelease ${QMAKE_FILE_IN}; $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
updateqm.name = LRELEASE ${QMAKE_FILE_IN}
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqm