summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-10-11 18:44:48 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-10-11 18:44:48 (GMT)
commitbb28c9f3bfca406846ff67e4a1f96e87e708f749 (patch)
treed5d37954152957b3b3d0ab4104c2d568faba89b6 /Modules
parentfac6e2ef4448a3dd42c149383468b9b681d3215f (diff)
parent648c4544542ff54b3d5c498f36acae970edf0ae0 (diff)
downloadCMake-bb28c9f3bfca406846ff67e4a1f96e87e708f749.zip
CMake-bb28c9f3bfca406846ff67e4a1f96e87e708f749.tar.gz
CMake-bb28c9f3bfca406846ff67e4a1f96e87e708f749.tar.bz2
Merge topic 'qt_dbus_interface_args'
648c454 Add features from KDE for arguments to qdbusxml2cpp.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Qt4Macros.cmake19
1 files changed, 16 insertions, 3 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 6d7a3ec..630a0ba 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -216,9 +216,22 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
- # handling more arguments (as in FindQt4.cmake from KDE4) will come soon, then
- # _params will be used for more than just -m
- SET(_params -m)
+ GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
+ IF(_nonamespace)
+ SET(_params -N -m)
+ ELSE(_nonamespace)
+ SET(_params -m)
+ ENDIF(_nonamespace)
+
+ GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME)
+ IF(_classname)
+ SET(_params ${_params} -c ${_classname})
+ ENDIF(_classname)
+
+ GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
+ IF(_include)
+ SET(_params ${_params} -i ${_include})
+ ENDIF(_include)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}