1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 14:27:56 +00:00

Move qm_gen.pri

This commit is contained in:
Chocobo1 2018-06-11 17:49:58 +08:00
parent 5d94db9c79
commit 5b7c089dd2
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
4 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,6 @@ TEMPLATE = subdirs
SUBDIRS += src
include(version.pri)
include(qm_gen.pri)
# Make target to create release tarball. Use 'make tarball'
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&

View File

@ -31,8 +31,8 @@ find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
get_filename_component(_lang_qrc_src "${CMAKE_CURRENT_SOURCE_DIR}/../lang/lang.qrc" ABSOLUTE)
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang.qrc" ABSOLUTE)
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../" ABSOLUTE)
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang/lang.qrc" ABSOLUTE)
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
message(STATUS "copying ${_lang_qrc_src} -> ${_lang_qrc_dst}")
file(COPY ${_lang_qrc_src} DESTINATION ${_lang_qrc_dst_dir})

View File

@ -1,5 +1,5 @@
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
TS_IN_NOEXT = $$replace(TS_IN,".ts","")
TRANSLATIONS += $$files(qbittorrent_*.ts)
TS_IN_NOEXT = $$replace(TRANSLATIONS,".ts","")
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
@ -16,6 +16,6 @@ isEmpty(QMAKE_LRELEASE) {
message("Building translations")
for(L,TS_IN_NOEXT) {
message("Processing $${L}")
system("$$QMAKE_LRELEASE -silent src/$${L}.ts -qm src/$${L}.qm")
!exists("src/$${L}.qm"):error("Building translations failed, cannot continue")
system("$$QMAKE_LRELEASE -silent $${L}.ts -qm $${L}.qm")
!exists("$${L}.qm"):error("Building translations failed, cannot continue")
}

View File

@ -78,6 +78,6 @@ RESOURCES += \
searchengine/searchengine.qrc
# Translations
TRANSLATIONS += $$files(lang/qbittorrent_*.ts)
include(lang/lang.pri)
DESTDIR = .