01d2f35b69
CONFIG+=lrelease enables that all .ts files in TRANSLATIONS or EXTRA_TRANSLATIONS are compiled by lrelease. EXTRA_TRANSLATIONS is a new variable that is only processed by lrelease, but not lupdate - this is useful for translation files that are supposed to be empty, because they match the language of the original translation sources. If embed_translations is also set, the generated .qm files will be made available through the Qt resource system under :/i18n/. Alternatively, the user can specify an installation target by setting QM_FILES_INSTALL_PATH. Note that relative paths in TRANSLATIONS are not taken into account. That is, TRANSLATIONS = component1/de.ts component2/de.ts will cause a conflict. [ChangeLog][qmake] New CONFIG options lrelease and embed_translations were added. CONFIG+=lrelease does run lrelease on translation files listed in TRANSLATIONS and EXTRA_TRANSLATIONS. CONFIG+=embed_translations does include the generated .qm files as resources under :/i18n/. Change-Id: I94db5b8431d07b24f59b2c332ede91450f9c0c58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
|
|
defineTest(addExclusiveBuildsProper) {
|
|
!$$1:!fix_output_dirs: \
|
|
return(true)
|
|
|
|
for(build, 2) {
|
|
isEmpty($${build}.name) {
|
|
$${build}.name = $$title($$build)
|
|
export($${build}.name)
|
|
}
|
|
isEmpty($${build}.target) {
|
|
$${build}.target = $$lower($$build)
|
|
export($${build}.target)
|
|
}
|
|
isEmpty($${build}.dir_affix) {
|
|
$${build}.dir_affix = $$lower($$build)
|
|
export($${build}.dir_affix)
|
|
}
|
|
|
|
$${build}.exclusive = $$2
|
|
export($${build}.exclusive)
|
|
|
|
QMAKE_EXCLUSIVE_BUILDS += $$build
|
|
}
|
|
|
|
CONFIG *= exclusive_builds
|
|
export(CONFIG)
|
|
|
|
export(QMAKE_EXCLUSIVE_BUILDS)
|
|
return(true)
|
|
}
|
|
|
|
defineTest(addExclusiveBuilds) {
|
|
lessThan(ARGC, 2): \
|
|
error("addExclusiveBuilds() requires at least two arguments")
|
|
|
|
addExclusiveBuildsProper($$join(ARGS, _and_), $$ARGS)
|
|
}
|
|
|
|
# Default directories to process
|
|
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
|
|
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
|