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}
)
set(filechooser_HDRS filechooserInterface.h filechooserProxy.h introspectableInterface.h)
set(filechooser_SRCS filechooserInterface.cpp filechooserProxy.cpp introspectableInterface.cpp)
set(interfaces filechooser)
add_custom_command(
OUTPUT ${filechooser_HDRS} ${filechooser_SRCS}
COMMAND ${DBUSXML2QT3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/filechooser.xml
DEPENDS filechooser.xml
foreach(interface IN LISTS interfaces)
set(interface_HDRS
introspectableInterface.h
${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}
)
)
add_custom_target(${interface} DEPENDS ${interface_SRCS})
list(APPEND interfaces_SRCS ${interface_SRCS})
endforeach()
tde_add_library(portalinterfaces STATIC_PIC AUTOMOC
SOURCES ${filechooser_SRCS}
DEPENDENCIES ${interfaces}
SOURCES ${interfaces_SRCS}
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">
<node name="/">
<node name="/org/freedesktop/portal/desktop">
<interface name="org.freedesktop.impl.portal.FileChooser">
<method name="OpenFile">
<arg name="handle" type="o" direction="in" />

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

Loading…
Cancel
Save