4cd9f900fc
Tested in a bulk build by landry@. Lot of feedback from various people on ports@: thanks! OK landry@, sthen@
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
$OpenBSD: patch-Modules_Qt4Macros_cmake,v 1.3 2011/03/13 18:23:02 dcoppa Exp $
|
|
--- Modules/Qt4Macros.cmake.orig Tue Feb 15 18:47:27 2011
|
|
+++ Modules/Qt4Macros.cmake Mon Mar 7 10:10:46 2011
|
|
@@ -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)
|
|
|
|
|
|
@@ -218,9 +220,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}
|