summaryrefslogtreecommitdiffstats
path: root/src/libtdebluez/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtdebluez/interfaces')
-rw-r--r--src/libtdebluez/interfaces/CMakeLists.txt135
1 files changed, 135 insertions, 0 deletions
diff --git a/src/libtdebluez/interfaces/CMakeLists.txt b/src/libtdebluez/interfaces/CMakeLists.txt
new file mode 100644
index 0000000..2f44a83
--- /dev/null
+++ b/src/libtdebluez/interfaces/CMakeLists.txt
@@ -0,0 +1,135 @@
+#################################################
+#
+# (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 )
+
+set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
+set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp)
+
+set( AgentManager_HDRS agentmanager1Interface.h agentmanager1Proxy.h healthmanager1Interface.h healthmanager1Proxy.h profilemanager1Interface.h profilemanager1Proxy.h )
+set( AgentManager_SRCS agentmanager1Interface.cpp agentmanager1Proxy.cpp healthmanager1Interface.cpp healthmanager1Proxy.cpp profilemanager1Interface.cpp profilemanager1Proxy.cpp )
+
+set( Agent_HDRS agent1Interface.h agent1Proxy.h dbusbaseNode.h tdebluezNode.h )
+set( Agent_SRCS agent1Interface.cpp agent1Proxy.cpp dbusbaseNode.cpp tdebluezNode.cpp )
+
+set( Adapter_HDRS adapter1Interface.h adapter1Proxy.h gattmanager1Interface.h gattmanager1Proxy.h media1Interface.h media1Proxy.h networkserver1Interface.h networkserver1Proxy.h propertiesInterface.h propertiesProxy.h)
+set( Adapter_SRCS adapter1Interface.cpp adapter1Proxy.cpp gattmanager1Interface.cpp gattmanager1Proxy.cpp media1Interface.cpp media1Proxy.cpp networkserver1Interface.cpp networkserver1Proxy.cpp propertiesInterface.cpp propertiesProxy.cpp )
+
+set( Device_HDRS device1Interface.h device1Proxy.h mediacontrol1Interface.h mediacontrol1Proxy.h)
+set( Device_SRCS device1Interface.cpp device1Proxy.cpp mediacontrol1Interface.cpp mediacontrol1Proxy.cpp )
+
+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( )
+
+#function( install_header fileinput target )
+# install(
+# FILES ${CMAKE_CURRENT_BUILD_DIR}/${fileinput}
+# DESTINATION ${target}
+# )
+#endfunction( )
+
+
+##### 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 )
+
+##### AgentManager #########################
+add_custom_command(
+ OUTPUT ${AgentManager_HDRS} ${AgentManager_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.manager.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.bluez.manager.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+make_moc ( agentmanager1Proxy )
+make_moc ( healthmanager1Proxy )
+make_moc ( profilemanager1Proxy )
+
+##### Agent #########################
+add_custom_command(
+ OUTPUT ${Agent_HDRS} ${Agent_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.tdebluez.agent.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.tdebluez.agent.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+make_moc ( agent1Proxy )
+
+##### Adapter #########################
+add_custom_command(
+ OUTPUT ${Adapter_HDRS} ${Adapter_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.adapter.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.bluez.adapter.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+make_moc ( adapter1Proxy )
+make_moc ( gattmanager1Proxy )
+make_moc ( networkserver1Proxy )
+make_moc ( propertiesProxy )
+
+##### Device #########################
+add_custom_command(
+ OUTPUT ${Device_HDRS} ${Device_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.device.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.bluez.device.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+make_moc ( device1Proxy )
+make_moc ( propertiesProxy )
+make_moc ( mediacontrol1Proxy )
+make_moc ( media1Proxy )
+
+tde_add_library( bluezinterfaces STATIC_PIC AUTOMOC
+ SOURCES ${ObjectManager_SRCS} ${AgentManager_SRCS} ${Agent_SRCS} ${Adapter_SRCS} ${Device_SRCS}
+ LINK ${DBUS_TQT_LIBRARIES}
+)
+
+##### install 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}/tdebluez
+ USE_SOURCE_PERMISSIONS
+ FILES_MATCHING PATTERN PATTERN "*.h"
+ PATTERN "CMakeFiles" EXCLUDE)