Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123405

[REG 6.6 -> 6.7.0 RC] Translations were generated in the wrong folder

    XMLWordPrintable

Details

    • macOS, Windows
    • 5c3800b7f (dev), 78cf65161 (6.7.0), 400565f62 (6.7)

    Description

      I don't have minimal example, but I think you could reproduce it.

      ( GLOB TS_FILES "${CMAKE_SOURCE_DIR}/translations/*.ts" )
      qt6_add_translations( makhber
      TS_FILES ${TS_FILES}
        QM_FILES_OUTPUT_VARIABLE QM_FILES
        LUPDATE_OPTIONS "-no-obsolete"
        )
      message(STATUS "QM_FILES: ${QM_FILES}")
      add_custom_command( TARGET makhber
        POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E
          make_directory "$<TARGET_FILE_DIR:makhber>/translations"
        COMMAND ${CMAKE_COMMAND} -E
          copy ${QM_FILES} "$<TARGET_FILE_DIR:makhber>/translations/"
        COMMENT "Copying Translation files..."
      )
      

      the POST_BUILD custom_command started failing with Qt 6.7.0 (earlier, I was hoping It will be fixed before release)
      cmake shows:

      -- QM_FILES: D:/dev/makhber/build/qt67/src/main/makhber_cs.qm;D:/dev/makhber/build/qt67/src/main/makhber_de.qm;D:/dev/makhber/build/qt67/src/main/makhber_es.qm;D:/dev/makhber/build/qt67/src/main/makhber_ja.qm;D:/dev/makhber/build/qt67/src/main/makhber_pl.qm;D:/dev/makhber/build/qt67/src/main/makhber_pt_BR.qm;D:/dev/makhber/build/qt67/src/main/makhber_ru.qm;D:/dev/makhber/build/qt67/src/main/makhber_sv.qm;D:/dev/makhber/build/qt67/src/main/makhber_zh_CN.qm;D:/dev/makhber/build/qt67/src/main/makhber_zh_TW.qm
      

      but they are generated in ${CMAKE_BUILD_DIR} (D:/dev/makhber/build/qt67 in this case).
      That's why It fails because those files do not exist.

      Attachments

        1. QTBUG-123405.tar.gz
          0.9 kB
        2. QTBUG-123405-2.7z
          1.0 kB
        For Gerrit Dashboard: QTBUG-123405
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            mehdichinoune Mehdi Chinoune
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes