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

CMake + Qt5LinguistToolsMacros.cmake: QT5_CREATE_TRANSLATION delete source ts files during clean

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.0.2
    • Build tools: Other
    • None
    • everywhere

      I use QT5_CREATE_TRANSLATION inside my CMakelists.txt to keep my ts files in actual state. It is very useful. But when I call make clean my ts files are cleaned also. If I understand right it is because of

      add_custom_command(OUTPUT ${_ts_file} COMMAND ${Qt5_LUPDATE_EXECUTABLE} ARGS ${_lupdate_options} “@${_ts_lst_file}” -ts ${_ts_file} DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM)

      inside the QT5_CREATE_TRANSLATION function.

      I have patched the original Qt5LinguistToolsMacros.cmake to avoid this problem. See the attached patch.

      I hope this workaround will be usefull.

      BR

        1. Qt5LinguistToolsMacros.cmake.patch
          2 kB
          Anatoly Shirokov
        2. qtcmakebug.zip
          0.9 kB
          Anatoly Shirokov
        For Gerrit Dashboard: QTBUG-31860
        # Subject Branch Project Status CR V

            Unassigned Unassigned
            anatolys Anatoly Shirokov
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes