diff options
Diffstat (limited to 'src/libtdeobex/interfaces/CMakeLists.txt')
-rw-r--r-- | src/libtdeobex/interfaces/CMakeLists.txt | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/libtdeobex/interfaces/CMakeLists.txt b/src/libtdeobex/interfaces/CMakeLists.txt new file mode 100644 index 0000000..60a9659 --- /dev/null +++ b/src/libtdeobex/interfaces/CMakeLists.txt @@ -0,0 +1,103 @@ +################################################# +# +# (C) 2020 Emanoil Kotsev +# deloptes (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${DBUS_TQT_INCLUDE_DIRS} +) + +set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces ) +set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 ) + +function( make_moc fileinput ) + add_custom_command( OUTPUT ${fileinput}.moc + COMMAND ${TMOC_EXECUTABLE} ${fileinput}.h -o ${fileinput}.moc + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.h + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.cpp APPEND + PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.moc ) +endfunction( ) + +set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h ) +set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp ) + +set (Agent_HDRS agent1Interface.h agent1Proxy.h dbusbaseNode.h tdeobexNode.h) +set (Agent_SRCS agent1Interface.cpp agent1Proxy.cpp dbusbaseNode.cpp tdeobexNode.cpp) + +set (Client_HDRS agentmanager1Interface.h agentmanager1Proxy.h client1Interface.h client1Proxy.h filetransfer1Interface.h filetransfer1Proxy.h obexNode.h objectpush1Interface.h objectpush1Proxy.h phonebookaccess1Interface.h phonebookaccess1Proxy.h session1Interface.h session1Proxy.h synchronization1Interface.h synchronization1Proxy.h transfer1Interface.h transfer1Proxy.h) +set (Client_SRCS agentmanager1Interface.cpp agentmanager1Proxy.cpp client1Interface.cpp client1Proxy.cpp filetransfer1Interface.cpp filetransfer1Proxy.cpp obexNode.cpp objectpush1Interface.cpp objectpush1Proxy.cpp phonebookaccess1Interface.cpp phonebookaccess1Proxy.cpp session1Interface.cpp session1Proxy.cpp synchronization1Interface.cpp synchronization1Proxy.cpp transfer1Interface.cpp transfer1Proxy.cpp propertiesProxy.h propertiesProxy.cpp ) + + +##### ObjectManager ######################### +add_custom_command( + OUTPUT ${ObjectManager_HDRS} ${ObjectManager_SRCS} + COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.freedesktop.DBus.ObjectManager.xml 2>/dev/null + DEPENDS ${INTROSPECTIONPATH}/org.freedesktop.DBus.ObjectManager.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) +make_moc ( objectmanagerProxy ) + +##### Agent ######################### +add_custom_command( + OUTPUT ${Agent_HDRS} ${Agent_SRCS} + COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.obex.Agent1.xml 2>/dev/null + DEPENDS ${INTROSPECTIONPATH}/org.bluez.obex.Agent1.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) +make_moc ( agent1Proxy ) + +##### Client ######################### +add_custom_command( + OUTPUT ${Client_HDRS} ${Client_SRCS} + COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.obex.client.xml 2>/dev/null + DEPENDS ${INTROSPECTIONPATH}/org.bluez.obex.client.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) +make_moc ( agentmanager1Proxy ) +make_moc ( client1Proxy ) +make_moc ( filetransfer1Proxy ) +make_moc ( objectpush1Proxy ) +make_moc ( phonebookaccess1Proxy ) +make_moc ( session1Proxy ) +make_moc ( synchronization1Proxy ) +make_moc ( transfer1Proxy ) +make_moc ( propertiesProxy ) + +tde_add_library( obexinterfaces STATIC_PIC AUTOMOC + SOURCES ${ObjectManager_SRCS} ${Agent_SRCS} ${Client_SRCS} + LINK ${DBUS_TQT_LIBRARIES} +) + +##### headers ################################### + +#file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR} +# ${CMAKE_CURRENT_BINARY_DIR}/* ) +#unset( _exclude_dirs ) +#foreach( _dir IN LISTS _bin_dirs ) +# if( IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} ) +# list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE ) +# endif() +#endforeach() +# +#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +# DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex +# USE_SOURCE_PERMISSIONS +# FILES_MATCHING PATTERN PATTERN "*.h" +# ${_exclude_dirs} +#) + +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex + USE_SOURCE_PERMISSIONS + FILES_MATCHING PATTERN PATTERN "*.h" + PATTERN "CMakeFiles" EXCLUDE ) |