################################################################################ # XDG Desktop Portal implementation for TDE # # Copyright (C) 2024 Mavridis Philippe # # # # Improvements and feedback are welcome! # # This software is licensed under the terms of the GNU GPL v3 license. # ################################################################################ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${DBUS_TQT_INCLUDE_DIRS} ) link_directories( ${DBUS_TQT_LIBRARY_DIRS} ) 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 DEPENDENCIES ${interfaces} SOURCES ${interfaces_SRCS} LINK ${DBUS_TQT_LIBRARIES} ) configure_file(org.freedesktop.impl.portal.desktop.tde.service.cmake org.freedesktop.impl.portal.desktop.tde.service @ONLY) configure_file(xdg-desktop-portal-tde.desktop.cmake xdg-desktop-portal-tde.desktop @ONLY) install(FILES tde.portal DESTINATION ${XDG_PREFIX}/share/xdg-desktop-portal/portals) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.tde.service DESTINATION ${DBUS_SESSION_DIRECTORY}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xdg-desktop-portal-tde.desktop DESTINATION ${SHARE_INSTALL_PREFIX}/applications)