Improve DBus XML code generation

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/6/head
Mavridis Philippe 5 months ago
parent ae92cf1205
commit 30af69c9c0
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -15,18 +15,43 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS} ${DBUS_TQT_LIBRARY_DIRS}
) )
set(filechooser_HDRS filechooserInterface.h filechooserProxy.h introspectableInterface.h) set(interfaces filechooser)
set(filechooser_SRCS filechooserInterface.cpp filechooserProxy.cpp introspectableInterface.cpp)
add_custom_command( foreach(interface IN LISTS interfaces)
OUTPUT ${filechooser_HDRS} ${filechooser_SRCS} set(interface_HDRS
COMMAND ${DBUSXML2QT3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/filechooser.xml introspectableInterface.h
DEPENDS filechooser.xml ${interface}Interface.h
${interface}Proxy.h
desktopNode.h
dbusbaseNode.h
)
set(interface_SRCS
introspectableInterface.cpp
${interface}Interface.cpp
${interface}Proxy.cpp
desktopNode.cpp
dbusbaseNode.cpp
)
set(interface_xml ${CMAKE_CURRENT_SOURCE_DIR}/${interface}.xml)
add_custom_command(
OUTPUT ${interface_HDRS} ${interface_SRCS}
COMMAND ${DBUSXML2QT3_EXECUTABLE} ${interface_xml}
DEPENDS ${interface_xml}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) )
add_custom_target(${interface} DEPENDS ${interface_SRCS})
list(APPEND interfaces_SRCS ${interface_SRCS})
endforeach()
tde_add_library(portalinterfaces STATIC_PIC AUTOMOC tde_add_library(portalinterfaces STATIC_PIC AUTOMOC
SOURCES ${filechooser_SRCS} DEPENDENCIES ${interfaces}
SOURCES ${interfaces_SRCS}
LINK ${DBUS_TQT_LIBRARIES} LINK ${DBUS_TQT_LIBRARIES}
) )

@ -1,5 +1,5 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/"> <node name="/org/freedesktop/portal/desktop">
<interface name="org.freedesktop.impl.portal.FileChooser"> <interface name="org.freedesktop.impl.portal.FileChooser">
<method name="OpenFile"> <method name="OpenFile">
<arg name="handle" type="o" direction="in" /> <arg name="handle" type="o" direction="in" />

@ -7,7 +7,6 @@
################################################################################ ################################################################################
include_directories( include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}

Loading…
Cancel
Save