Skip to content

Commit 5b7c089

Browse files
committed
Move qm_gen.pri
1 parent 5d94db9 commit 5b7c089

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

qbittorrent.pro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ TEMPLATE = subdirs
33
SUBDIRS += src
44

55
include(version.pri)
6-
include(qm_gen.pri)
76

87
# Make target to create release tarball. Use 'make tarball'
98
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&

src/app/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
3131
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
3232

3333
get_filename_component(_lang_qrc_src "${CMAKE_CURRENT_SOURCE_DIR}/../lang/lang.qrc" ABSOLUTE)
34-
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang.qrc" ABSOLUTE)
35-
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../" ABSOLUTE)
34+
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang/lang.qrc" ABSOLUTE)
35+
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
3636

3737
message(STATUS "copying ${_lang_qrc_src} -> ${_lang_qrc_dst}")
3838
file(COPY ${_lang_qrc_src} DESTINATION ${_lang_qrc_dst_dir})

qm_gen.pri renamed to src/lang/lang.pri

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
2-
TS_IN_NOEXT = $$replace(TS_IN,".ts","")
1+
TRANSLATIONS += $$files(qbittorrent_*.ts)
2+
TS_IN_NOEXT = $$replace(TRANSLATIONS,".ts","")
33

44
isEmpty(QMAKE_LRELEASE) {
55
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
@@ -16,6 +16,6 @@ isEmpty(QMAKE_LRELEASE) {
1616
message("Building translations")
1717
for(L,TS_IN_NOEXT) {
1818
message("Processing $${L}")
19-
system("$$QMAKE_LRELEASE -silent src/$${L}.ts -qm src/$${L}.qm")
20-
!exists("src/$${L}.qm"):error("Building translations failed, cannot continue")
19+
system("$$QMAKE_LRELEASE -silent $${L}.ts -qm $${L}.qm")
20+
!exists("$${L}.qm"):error("Building translations failed, cannot continue")
2121
}

src/src.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ RESOURCES += \
7878
searchengine/searchengine.qrc
7979

8080
# Translations
81-
TRANSLATIONS += $$files(lang/qbittorrent_*.ts)
81+
include(lang/lang.pri)
8282

8383
DESTDIR = .

0 commit comments

Comments
 (0)