openbsd-ports/devel/cmake/patches/patch-Modules_Qt4Macros_cmake
dcoppa 195d9f90cf Update to cmake-2.8.3
OK sthen@, landry@ (who also tested this in a bulk build)
2010-11-15 11:39:08 +00:00

39 lines
1.5 KiB
Plaintext

$OpenBSD: patch-Modules_Qt4Macros_cmake,v 1.2 2010/11/15 11:39:09 dcoppa Exp $
--- Modules/Qt4Macros.cmake.orig Wed Nov 3 20:58:27 2010
+++ Modules/Qt4Macros.cmake Wed Nov 10 09:01:26 2010
@@ -135,6 +135,8 @@ MACRO (QT4_GENERATE_MOC infile outfile )
ENDIF(NOT IS_ABSOLUTE "${outfile}")
QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "")
SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
+
+ MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile})
ENDMACRO (QT4_GENERATE_MOC)
@@ -213,9 +215,22 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _base
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}