summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-15 12:19:57 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-06-15 13:22:55 (GMT)
commitbcbb66df3d517cfb0bac63b041f666ee9db0e42d (patch)
tree6193c60430dd31433515e9f7d46e8666c11972e3
parent61728dd4371f075030b58cf65ed2d0e9657c3b97 (diff)
downloadQt-bcbb66df3d517cfb0bac63b041f666ee9db0e42d.zip
Qt-bcbb66df3d517cfb0bac63b041f666ee9db0e42d.tar.gz
Qt-bcbb66df3d517cfb0bac63b041f666ee9db0e42d.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 (cherry picked from commit c185a351d7b72812b5f93163ee43edd73784522c)
-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