Skip to content

Commit

Permalink
fix(rcc): issue with automatic generation of qtbase qrc file
Browse files Browse the repository at this point in the history
  • Loading branch information
0xzer0x committed Nov 18, 2024
1 parent 5443c36 commit 1576bdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
18 changes: 0 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,28 +266,10 @@ list(APPEND SUPPORTED_LANGUAGES ar tr ru id)
foreach(lang IN LISTS SUPPORTED_LANGUAGES)
message(STATUS "Adding ${lang} translation file to QC_TS")
list(APPEND QC_TS "dist/translations/out/qc_${lang}.ts")

if(EXISTS "dist/translations/qtbase/${lang}.qm")
message(STATUS "Copying ${lang} qt translations to build tree")
configure_file("dist/translations/qtbase/${lang}.qm"
"${CMAKE_BINARY_DIR}/${lang}.qm" COPYONLY)

message(STATUS "Adding ${lang} qtbase qm file to QTBASE_QM")
list(APPEND QTBASE_QM "${CMAKE_BINARY_DIR}/${lang}.qm")
endif()
endforeach()

message(STATUS "Creating qt translations resource file")
qt_add_translations(quran-companion TS_FILES ${QC_TS})
qt_add_resources(
quran-companion
"qttranslations"
PREFIX
"/qtbase"
BASE
${CMAKE_BINARY_DIR}
FILES
${QTBASE_QM})

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(quran-companion)
Expand Down
5 changes: 5 additions & 0 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@
<file>resources/tray.png</file>
<file>resources/files.xml</file>
</qresource>
<qresource prefix="/qtbase">
<file alias="ar.qm">dist/translations/qtbase/ar.qm</file>
<file alias="ru.qm">dist/translations/qtbase/ru.qm</file>
<file alias="tr.qm">dist/translations/qtbase/tr.qm</file>
</qresource>
</RCC>

0 comments on commit 1576bdb

Please sign in to comment.