diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-09-18 14:56:58 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-09-18 14:56:58 (GMT) |
commit | 139cae931e7857a4bba59093df6b8b1c64356493 (patch) | |
tree | 76c1f8b0d3c2265dd740333f8fd3e08d92d6d0f7 /Modules/FindQt4.cmake | |
parent | 6ac4795a44c9b2dcc34a8960fa266ad03c8c1929 (diff) | |
download | CMake-139cae931e7857a4bba59093df6b8b1c64356493.zip CMake-139cae931e7857a4bba59093df6b8b1c64356493.tar.gz CMake-139cae931e7857a4bba59093df6b8b1c64356493.tar.bz2 |
ENH: For #7433, add a bit more documentation and add ability
to specify extra flags to lupdate.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 626232f..8280fdf 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -103,9 +103,12 @@ # interface file is constructed from the basename of the header with # the suffix .xml appended. # -# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... ts_files ... ) +# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... +# ts_files ... OPTIONS ...) # out: qm_files # in: directories sources ts_files +# options: flags to pass to lupdate, such as -extensions to specify +# extensions for a directory scan. # generates commands to create .ts (vie lupdate) and .qm # (via lrelease) - files from directories and/or sources. The ts files are # created and/or updated in the source tree (unless given with full paths). @@ -1290,9 +1293,12 @@ IF (QT4_QMAKE_FOUND) ENDMACRO(QT4_AUTOMOC) MACRO(QT4_CREATE_TRANSLATION _qm_files) + QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) + MESSAGE("lupdate_files ${_lupdate_files}") + MESSAGE("lupdate_options ${_lupdate_options}") SET(_my_sources) SET(_my_tsfiles) - FOREACH (_file ${ARGN}) + FOREACH (_file ${_lupdate_files}) GET_FILENAME_COMPONENT(_ext ${_file} EXT) GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) IF(_ext MATCHES "ts") @@ -1304,7 +1310,7 @@ IF (QT4_QMAKE_FOUND) FOREACH(_ts_file ${_my_tsfiles}) ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} COMMAND ${QT_LUPDATE_EXECUTABLE} - ARGS ${_my_sources} -ts ${_ts_file} + ARGS ${_lupdate_options} ${_my_sources} -ts ${_ts_file} DEPENDS ${_my_sources}) ENDFOREACH(_ts_file) QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) |