title: A proper workflow for CMake + Qt translation system
body: <p>I recently moved my Qt project form qmake to CMake build system and now I'm trying to set up a translation system. I tried to use <code>qt5_create_translation</code> macro (documented <a href="http://doc.qt.io/qt-5/cmake-manual.html#qt5linguisttools-macros" rel="noreferrer">here</a>) to update my *.ts files and generate *.qm files. By default the macro creates (or updates) *.ts files in the source directory and *.qm files in the build directory, which is pretty logical and convenient to use. The nature of underlying <code>lupdate</code> utility is such that *.ts files cannot be destroyed - they may be updated only. So I see my workflow as follows:</p>
  
  <ol>
  <li>Add or modify source or UI files.</li>
  <li>Rebuild the project: new translatable strings will be added to *.ts files.</li>
  <li>Add actual translations to *.ts now or commit changes 'as is' in order to add the translations later.</li>
  <li>As soon as translations are added to *.ts, rebuild the project to obtain the up-to-date *.qm files.</li>
  </ol>
  
  <p>With this workflow *.ts files are almost always synchronized with source files and *.qm files are generated every time you build the project. But the ideology of CMake and/or Qt5 plugin for CMake follows another way. CMake rightly accounts *.ts files as build artifacts, so it generates a rule to delete them (from source tree (!)) on <code>make clean</code>. This behavior was at least <a href="https://bugreports.qt.io/browse/QTBUG-31860" rel="noreferrer">tw</a><a href="https://bugreports.qt.io/browse/QTBUG-41736" rel="noreferrer">ice</a> registered as a bug, but maintainers seem to insist it's not a bug, but a feature.</p>
  
  <p>I found an <a href="https://stackoverflow.com/questions/24095800/qt-internationalization-and-cmake-how-to-update-ts-and-dont-lose-them">advice</a> to add a subdirectory with translations and <code>CLEAN_NO_CUSTOM</code> on it, but these modifications break the build: adding *.qm file to executable target does not add the subdirectory to executable dependency list. So build build fails to find *.qm files and stops.</p>
  
  <p>Adding custom CMake target and\or command invoking <code>lupdate</code> derogates all advantages of <code>Qt5LinguistTools</code> module and <code>qt5_create_translation</code> macro.</p>
  
  <p>Adding a CMake option like <a href="https://itk.org/Wiki/CMake:How_To_Build_Qt4_Software" rel="noreferrer">here</a> looks like an ugly workaround and does not keep the developer from loosing uncommitted translation by accidental invocation of <code>make clean</code> when <code>UPDATE_TRANSLATIONS</code> is turned on.</p>
  
  <p>So what is the proper way to use <code>qt5_create_translation</code> macro with it's present-day behavior?</p>