diff options
-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 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} |