File: CMakeLists.txt

package info (click to toggle)
bluez-qt 5.62.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,708 kB
  • sloc: cpp: 14,071; xml: 424; ansic: 318; sh: 22; makefile: 9
file content (191 lines) | stat: -rw-r--r-- 6,514 bytes parent folder | download
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
set(bluezqt_SRCS
    a2dp-codecs.c
    manager.cpp
    manager_p.cpp
    adapter.cpp
    adapter_p.cpp
    device.cpp
    device_p.cpp
    gattapplication.cpp
    gattapplication_p.cpp
    gattcharacteristic.cpp
    gattcharacteristic_p.cpp
    gattcharacteristicadaptor.cpp
    gattmanager.cpp
    gattmanager_p.cpp
    gattservice.cpp
    gattservice_p.cpp
    gattserviceadaptor.cpp
    input.cpp
    leadvertisement.cpp
    leadvertisement_p.cpp
    leadvertisementadaptor.cpp
    leadvertisingmanager.cpp
    media.cpp
    mediaendpoint.cpp
    mediaendpoint_p.cpp
    mediaendpointadaptor.cpp
    mediaplayer.cpp
    mediaplayer_p.cpp
    mediaplayertrack.cpp
    mediatransport.cpp
    mediatransport_p.cpp
    objectmanageradaptor.cpp
    devicesmodel.cpp
    job.cpp
    initmanagerjob.cpp
    initobexmanagerjob.cpp
    utils.cpp
    agent.cpp
    agentadaptor.cpp
    profile.cpp
    profileadaptor.cpp
    pendingcall.cpp
    request.cpp
    rfkill.cpp
    obexmanager.cpp
    obexmanager_p.cpp
    obexagent.cpp
    obexagentadaptor.cpp
    obextransfer.cpp
    obexsession.cpp
    obexobjectpush.cpp
    obexfiletransfer.cpp
    obexfiletransferentry.cpp
)

ecm_qt_declare_logging_category(bluezqt_SRCS HEADER debug.h IDENTIFIER BLUEZQT CATEGORY_NAME org.kde.bluez)

set(dbusobjectmanager_xml ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.freedesktop.DBus.ObjectManager.xml)
set_source_files_properties(${dbusobjectmanager_xml} PROPERTIES INCLUDE "bluezqt_dbustypes.h")
qt5_add_dbus_interface(bluezqt_SRCS ${dbusobjectmanager_xml} dbusobjectmanager)

set(obexfiletransfer1_xml ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.FileTransfer1.xml)
set_source_files_properties(${obexfiletransfer1_xml} PROPERTIES INCLUDE "bluezqt_dbustypes.h")
qt5_add_dbus_interface(bluezqt_SRCS ${obexfiletransfer1_xml} obexfiletransfer1)

qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.freedesktop.DBus.Properties.xml dbusproperties)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.Adapter1.xml bluezadapter1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.AgentManager1.xml bluezagentmanager1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.GattCharacteristic1.xml bluezgattcharacteristic1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.GattManager1.xml bluezgattmanager1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.ProfileManager1.xml bluezprofilemanager1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.Device1.xml bluezdevice1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.LEAdvertisement1.xml bluezleadvertisement1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.LEAdvertisingManager1.xml bluezleadvertisingmanager1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.Media1.xml bluezmedia1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.MediaEndpoint1.xml bluezmediaendpoint1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.MediaPlayer1.xml bluezmediaplayer1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.AgentManager1.xml obexagentmanager1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.Client1.xml obexclient1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.Transfer1.xml obextransfer1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.Session1.xml obexsession1)
qt5_add_dbus_interface(bluezqt_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/org.bluez.obex.ObjectPush1.xml obexobjectpush1)

add_library(KF5BluezQt ${bluezqt_SRCS})
generate_export_header(KF5BluezQt BASE_NAME BluezQt)
add_library(KF5::BluezQt ALIAS KF5BluezQt)

target_include_directories(KF5BluezQt INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/BluezQt>")

target_link_libraries(KF5BluezQt
    PUBLIC
        Qt5::Core
    PRIVATE
        Qt5::DBus
        Qt5::Network
)

set_target_properties(KF5BluezQt
    PROPERTIES VERSION ${BLUEZQT_VERSION_STRING}
    SOVERSION ${BLUEZQT_SOVERSION}
    EXPORT_NAME "BluezQt"
)

ecm_generate_headers(BluezQt_CamelCase_HEADERS
    HEADER_NAMES
        Types
        Manager
        Adapter
        Device
        GattApplication
        GattCharacteristic
        GattManager
        GattService
        Input
        LEAdvertisement
        LEAdvertisingManager
        Media
        MediaEndpoint
        MediaPlayer
        MediaPlayerTrack
        DevicesModel
        Job
        InitManagerJob
        InitObexManagerJob
        Services
        Agent
        Profile
        PendingCall
        Request
        ObexManager
        ObexAgent
        ObexTransfer
        ObexSession
        ObexObjectPush
        ObexFileTransfer
        ObexFileTransferEntry

    REQUIRED_HEADERS BluezQt_HEADERS
    PREFIX BluezQt
)

# Install files
install(TARGETS KF5BluezQt
        EXPORT KF5BluezQtTargets
        ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})

install(FILES
    ${BluezQt_CamelCase_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/BluezQt/BluezQt
    COMPONENT Devel)

install(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/bluezqt_export.h
    ${BluezQt_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/BluezQt/bluezqt
    COMPONENT Devel)

if(BUILD_QCH)
    ecm_add_qch(
        KF5BluezQt_QCH
        NAME BluezQt
        BASE_NAME KF5BluezQt
        VERSION ${KF5_VERSION}
        ORG_DOMAIN org.kde
        SOURCES # using only public headers, to cover only public API
            ${BluezQt_HEADERS}
        MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
        LINK_QCHS
            Qt5Core_QCH
        BLANK_MACROS
            BLUEZQT_EXPORT
            BLUEZQT_DEPRECATED
            BLUEZQT_DEPRECATED_EXPORT
        TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
        QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
        COMPONENT Devel
    )
endif()

include(ECMGeneratePriFile)

ecm_generate_pri_file(
    BASE_NAME BluezQt
    LIB_NAME KF5BluezQt
    DEPS "core"
    FILENAME_VAR PRI_FILENAME
    INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/BluezQt
)
install(FILES ${PRI_FILENAME}
        DESTINATION ${ECM_MKSPECS_INSTALL_DIR})