openbsd-ports/devel/cmake/patches/patch-Modules_Qt4Macros_cmake
dcoppa d89de7a682 Update to cmake-2.8.5
Went in a bulk without issues, ok landry@
2011-09-20 11:32:36 +00:00

39 lines
1.5 KiB
Plaintext

$OpenBSD: patch-Modules_Qt4Macros_cmake,v 1.4 2011/09/20 11:32:36 dcoppa Exp $
--- Modules/Qt4Macros.cmake.orig Fri Jul 8 14:21:44 2011
+++ Modules/Qt4Macros.cmake Fri Sep 9 09:49:49 2011
@@ -133,6 +133,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)
@@ -216,9 +218,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}