diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-09-05 21:58:29 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-09-05 21:59:13 +0200 |
commit | 648c4544542ff54b3d5c498f36acae970edf0ae0 (patch) | |
tree | 1e97aef00c2297191061a5bcac87712aaec12c43 /Modules/Qt4Macros.cmake | |
parent | 48ba9b2f197cde7f309b9ef3770e1bf003a7e8e8 (diff) | |
download | cmake-648c4544542ff54b3d5c498f36acae970edf0ae0.tar.gz |
Add features from KDE for arguments to qdbusxml2cpp.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r-- | Modules/Qt4Macros.cmake | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 6d7a3ec21c..630a0bac1d 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} |