Qt: Remove broken-on-ninja ts.cmake

This commit is contained in:
Vicki Pfau 2022-07-03 21:17:10 -07:00
parent 40dd9b2b18
commit 38ae69d54d
2 changed files with 8 additions and 9 deletions

View File

@ -358,9 +358,14 @@ if(${QT}LinguistTools_FOUND)
endforeach()
list(APPEND TRANSLATION_FILES ${QT_QM_FILES})
endif()
add_custom_command(OUTPUT ${TRANSLATION_QRC}
COMMAND ${CMAKE_COMMAND} -DTRANSLATION_QRC:FILEPATH="${TRANSLATION_QRC}" -DQM_BASE="${CMAKE_CURRENT_BINARY_DIR}" "-DTRANSLATION_FILES='${TRANSLATION_FILES}'" -P "${CMAKE_CURRENT_SOURCE_DIR}/ts.cmake"
DEPENDS ${TRANSLATION_FILES})
file(WRITE ${TRANSLATION_QRC} "<RCC>\n\t<qresource prefix=\"/translations/\">\n")
foreach(TS ${TRANSLATION_FILES})
get_filename_component(TS_BASE "${TS}" NAME)
file(APPEND ${TRANSLATION_QRC} "\t\t<file alias=\"${TS_BASE}\">${TS}</file>\n")
endforeach()
file(APPEND ${TRANSLATION_QRC} "\t</qresource>\n</RCC>")
if(TARGET Qt6::Core)
qt_add_resources(TRANSLATION_RESOURCES ${TRANSLATION_QRC})
else()

View File

@ -1,6 +0,0 @@
file(WRITE ${TRANSLATION_QRC} "<RCC>\n\t<qresource prefix=\"/translations/\">\n")
foreach(TS ${TRANSLATION_FILES})
get_filename_component(TS_BASE "${TS}" NAME)
file(APPEND ${TRANSLATION_QRC} "\t\t<file alias=\"${TS_BASE}\">${TS}</file>\n")
endforeach()
file(APPEND ${TRANSLATION_QRC} "\t</qresource>\n</RCC>")