diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2012-02-09 02:01:29 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2012-02-09 02:01:29 (GMT) |
commit | 7a6d2796e63a8a390bd86fe9a029c4add119132b (patch) | |
tree | 3e234e5ee0ca8f4b54cfc0c10212be888351ef88 /Modules/Qt4Macros.cmake | |
parent | 59ecc2c8ac4f6e4e3e9b20a37763365060d8bb6d (diff) | |
download | CMake-7a6d2796e63a8a390bd86fe9a029c4add119132b.zip CMake-7a6d2796e63a8a390bd86fe9a029c4add119132b.tar.gz CMake-7a6d2796e63a8a390bd86fe9a029c4add119132b.tar.bz2 |
FindQt4: Add include directories for lupdate.
Fixes bug #12644.
Thanks Bernd Lörwald for partial patch.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r-- | Modules/Qt4Macros.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 4da1a3f..f327125 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -393,7 +393,13 @@ MACRO(QT4_CREATE_TRANSLATION _qm_files) FOREACH(_pro_src ${_my_sources}) SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"") ENDFOREACH(_pro_src ${_my_sources}) - FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}") + SET(_pro_includes) + GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) + FOREACH(_pro_include ${_inc_DIRS}) + GET_FILENAME_COMPONENT(_abs_include "${_pro_include}" ABSOLUTE) + SET(_pro_includes "${_pro_includes} \"${_abs_include}\"") + ENDFOREACH(_pro_include ${CMAKE_CXX_INCLUDE_PATH}) + FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n") ENDIF(_my_sources) ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} COMMAND ${QT_LUPDATE_EXECUTABLE} |