summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-14 21:16:03 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-02-14 21:16:03 (GMT)
commitd3d79c8b80aa606b12ebea3cb32b13e9bd15e321 (patch)
treea0e8dcaf9a329e7a31c37686c0c388b421533f4f /Modules
parent073b39f4453bf50c063f28c6ca98ec242e56c4da (diff)
parent7a6d2796e63a8a390bd86fe9a029c4add119132b (diff)
downloadCMake-d3d79c8b80aa606b12ebea3cb32b13e9bd15e321.zip
CMake-d3d79c8b80aa606b12ebea3cb32b13e9bd15e321.tar.gz
CMake-d3d79c8b80aa606b12ebea3cb32b13e9bd15e321.tar.bz2
Merge topic 'qt4-translation-includes'
7a6d279 FindQt4: Add include directories for lupdate.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Qt4Macros.cmake8
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}