summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2009-02-09 21:42:19 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2009-02-09 21:42:19 (GMT)
commitdda19cd36f94343e711210c6aefee8406bcce22e (patch)
tree2e1ea3ec598016e6b691239915efb0f0b0a2863d /Modules/FindQt4.cmake
parentbd92bec66ce6e167437182b6c554142852f7388c (diff)
downloadCMake-dda19cd36f94343e711210c6aefee8406bcce22e.zip
CMake-dda19cd36f94343e711210c6aefee8406bcce22e.tar.gz
CMake-dda19cd36f94343e711210c6aefee8406bcce22e.tar.bz2
ENH: Support .hpp with automoc.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index ee4d8bb..8d02824 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1167,7 +1167,11 @@ IF (QT4_QMAKE_FOUND)
FOREACH (_current_MOC_INC ${_match})
STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
- SET(_header ${_abs_PATH}/${_basename}.h)
+ IF(EXISTS ${_abs_PATH}/${_basename}.hpp)
+ SET(_header ${_abs_PATH}/${_basename}.hpp)
+ ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp)
+ SET(_header ${_abs_PATH}/${_basename}.h)
+ ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp)
SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})