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 @@ - + 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}