diff --git a/tdecore/tdehw/networkbackends/network-manager/dbus-introspection/CMakeLists.txt b/tdecore/tdehw/networkbackends/network-manager/dbus-introspection/CMakeLists.txt index 8efdd6031..c420c5e75 100644 --- a/tdecore/tdehw/networkbackends/network-manager/dbus-introspection/CMakeLists.txt +++ b/tdecore/tdehw/networkbackends/network-manager/dbus-introspection/CMakeLists.txt @@ -32,6 +32,13 @@ function( add_dbus_xml option basename classname namespace xmlfile ) add_custom_command( OUTPUT ${basename}.cpp ${basename}.h COMMAND ${DBUSXML2QT3_EXECUTABLE} -${option} ${basename} ${classname} -N ${namespace} ${INTROSPECTIONPATH}/${xmlfile} 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/${xmlfile} ) + if( "${option}" STREQUAL "p" ) + add_custom_command( OUTPUT ${basename}.moc + COMMAND ${TMOC_EXECUTABLE} ${basename}.h -o ${basename}.moc + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${basename}.h ) + set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${basename}.cpp APPEND + PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${basename}.moc ) + endif( ) endfunction( ) add_dbus_xml( p networkmanagerproxy NetworkManagerProxy DBus nm-manager.xml ) @@ -52,16 +59,6 @@ add_dbus_xml( p networkmanagersettings SettingsInterface DBus nm-settings.xml ) add_dbus_xml( p connectionsettings ConnectionSettingsInterface DBus nm-settings-connection.xml ) -# generate moc files - -set( MOCHEADERS accesspointproxy.h deviceproxy.h networkmanagerproxy.h networkmanagerpppproxy.h bluetoothproxy.h olpcmeshproxy.h ethernetproxy.h - infinibandproxy.h wifiproxy.h wimaxproxy.h activeconnectionproxy.h vpnconnectionproxy.h vpnpluginproxy.h modemproxy.h - networkmanagersettings.h connectionsettings.h ) - -foreach( _header_file ${MOCHEADERS} ) - tde_moc( MOCSOURCES ${CMAKE_CURRENT_BINARY_DIR}/${_header_file} ) -endforeach( ) - # build the library tde_add_library( tdenm_dbus STATIC_PIC @@ -71,5 +68,5 @@ tde_add_library( tdenm_dbus STATIC_PIC infinibandproxy.cpp wifiproxy.cpp wimaxproxy.cpp accesspointproxy.cpp networkmanagersettings.cpp connectionsettings.cpp activeconnectionproxy.cpp vpnconnectionproxy.cpp - vpnpluginproxy.cpp modemproxy.cpp ${MOCSOURCES} + vpnpluginproxy.cpp modemproxy.cpp )