blob: 4eba55d537dad803566bd8ad72ecb305223ca109 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
#################################################
#
# (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( 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}
)
##### 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}
)
##### 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}
)
##### 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}
)
##### 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}
)
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)
|