Projects
home:gcomes.pmbs:dsnote
speechnote
parallel-build.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File parallel-build.patch of Package speechnote
From 7e66592a8c84d955fec2d65510fb2767ab8005dc Mon Sep 17 00:00:00 2001 From: mkiol <michal@mkiol.net> Date: Fri, 11 Oct 2024 20:00:24 +0200 Subject: [PATCH] fix: parallel build error when gen translation files --- cmake/translations.cmake | 28 +++++++++++++++++----------- tools/make_translations_qrc.sh | 15 --------------- 2 files changed, 17 insertions(+), 26 deletions(-) delete mode 100755 tools/make_translations_qrc.sh diff --git a/cmake/translations.cmake b/cmake/translations.cmake index 74828777..4538f3d6 100644 --- a/cmake/translations.cmake +++ b/cmake/translations.cmake @@ -10,16 +10,22 @@ foreach(lang ${enabled_translations}) list(APPEND ts_files "${translations_dir}/dsnote-${lang}.ts") endforeach() +function(ADD_TRANSLATIONS_RESOURCE res_file) + set(_qm_files ${ARGN}) + set(_res_file ${translations_resource_file}) + + file(WRITE ${_res_file} "<!DOCTYPE RCC><RCC version=\"1.0\">\n <qresource prefix=\"/translations\">\n") + foreach(_lang ${_qm_files}) + get_filename_component(_filename ${_lang} NAME) + file(APPEND ${_res_file} " <file>${_filename}</file>\n") + endforeach() + file(APPEND ${_res_file} " </qresource>\n</RCC>\n") + + set(${res_file} ${_res_file} PARENT_SCOPE) +endfunction() + qt5_create_translation(qm_files ${CMAKE_SOURCE_DIR}/src ${desktop_dir}/qml ${sfos_dir}/qml ${ts_files}) -# pack translations to resource file only for desktop -string(REPLACE ";" " " enabled_translations_str "${enabled_translations}") -add_custom_command( - OUTPUT ${translations_resource_file} - COMMAND sh -c "${tools_dir}/make_translations_qrc.sh ${info_translations_id} /translations ${translations_resource_file} ${enabled_translations_str}" - DEPENDS ${qm_files} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - VERBATIM) -add_library(translations STATIC ${translations_resource_file}) - -list(APPEND deps translations) +add_translations_resource(translations_res ${qm_files}) + +list(APPEND deps_lib translations_res) diff --git a/tools/make_translations_qrc.sh b/tools/make_translations_qrc.sh deleted file mode 100755 index 9bd58b10..00000000 --- a/tools/make_translations_qrc.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/bash - -name="$1" -prefix="$2" -out="$3" -shift 3 -locales="$@" - -exec 1> "${out}" - -echo "<RCC><qresource prefix=\"${prefix}\">" -for locale in ${locales}; do - echo "<file>${name}-${locale}.qm</file>" -done -echo "</qresource></RCC>"
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.