summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interfaces/CMakeLists.txt45
-rw-r--r--interfaces/filechooser.xml2
-rw-r--r--src/CMakeLists.txt1
3 files changed, 36 insertions, 12 deletions
diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt
index f01262c..5a45e9f 100644
--- a/interfaces/CMakeLists.txt
+++ b/interfaces/CMakeLists.txt
@@ -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)
-
-add_custom_command(
- OUTPUT ${filechooser_HDRS} ${filechooser_SRCS}
- COMMAND ${DBUSXML2QT3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/filechooser.xml
- DEPENDS filechooser.xml
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
+set(interfaces filechooser)
+
+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}
)
diff --git a/interfaces/filechooser.xml b/interfaces/filechooser.xml
index da6bed2..5524d45 100644
--- a/interfaces/filechooser.xml
+++ b/interfaces/filechooser.xml
@@ -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" />
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index afcd9fd..34b4c02 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,7 +7,6 @@
################################################################################
include_directories(
- ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}