FindQt4: Add include directories for lupdate.

Fixes bug #12644.
Thanks Bernd Lörwald for partial patch.
This commit is contained in:
Clinton Stimpson 2012-02-08 19:01:29 -07:00
parent 59ecc2c8ac
commit 7a6d2796e6
1 changed files with 7 additions and 1 deletions

View File

@ -393,7 +393,13 @@ MACRO(QT4_CREATE_TRANSLATION _qm_files)
FOREACH(_pro_src ${_my_sources}) FOREACH(_pro_src ${_my_sources})
SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"") SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
ENDFOREACH(_pro_src ${_my_sources}) 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) ENDIF(_my_sources)
ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE} COMMAND ${QT_LUPDATE_EXECUTABLE}