2014-06-18 01:49:07 +01:00
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
|
|
|
|
|
2019-06-18 02:21:31 +01:00
|
|
|
set(KDECONNECT_PRIVATE_DBUS_ADDR unix:tmpdir=/tmp)
|
|
|
|
if(WIN32)
|
|
|
|
set(KDECONNECT_PRIVATE_DBUS_ADDR tcp:host=localhost,port=0)
|
|
|
|
endif()
|
2019-06-09 16:28:49 +01:00
|
|
|
set(KDECONNECT_PRIVATE_DBUS_NAME DBusKDEConnectOnly)
|
|
|
|
configure_file(dbushelper.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbushelper.h)
|
|
|
|
|
2023-07-31 10:21:36 +01:00
|
|
|
option(MDNS_ENABLED "Use MDNS for device discovery" ON)
|
|
|
|
|
2014-06-14 14:22:40 +01:00
|
|
|
add_subdirectory(backends/lan)
|
|
|
|
add_subdirectory(backends/loopback)
|
2017-05-24 22:52:18 +01:00
|
|
|
|
2023-11-20 18:09:13 +00:00
|
|
|
option(BLUETOOTH_ENABLED "Bluetooth support for kdeconnect" ON)
|
2017-05-24 22:52:18 +01:00
|
|
|
if(BLUETOOTH_ENABLED)
|
2023-12-28 16:37:31 +00:00
|
|
|
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Bluetooth)
|
2017-05-24 22:52:18 +01:00
|
|
|
add_subdirectory(backends/bluetooth)
|
|
|
|
endif()
|
2014-06-14 14:22:40 +01:00
|
|
|
|
2019-03-13 00:30:24 +00:00
|
|
|
option(LOOPBACK_ENABLED "Loopback backend enabled" OFF)
|
|
|
|
|
2023-07-20 14:31:40 +01:00
|
|
|
add_library(kdeconnectcore)
|
|
|
|
target_sources(kdeconnectcore PRIVATE
|
2015-02-24 06:14:22 +00:00
|
|
|
${backends_kdeconnect_SRCS}
|
2014-06-14 14:22:40 +01:00
|
|
|
|
|
|
|
backends/linkprovider.cpp
|
|
|
|
backends/devicelink.cpp
|
2015-07-05 14:23:53 +01:00
|
|
|
backends/pairinghandler.cpp
|
2014-06-14 14:22:40 +01:00
|
|
|
|
2014-06-14 15:34:00 +01:00
|
|
|
kdeconnectplugin.cpp
|
2015-03-14 04:19:39 +00:00
|
|
|
kdeconnectpluginconfig.cpp
|
2014-06-14 15:34:00 +01:00
|
|
|
pluginloader.cpp
|
2014-06-14 14:22:40 +01:00
|
|
|
|
2015-03-02 04:16:07 +00:00
|
|
|
kdeconnectconfig.cpp
|
2014-10-10 19:26:50 +01:00
|
|
|
dbushelper.cpp
|
2018-03-04 19:48:51 +00:00
|
|
|
networkpacket.cpp
|
2014-06-14 14:22:40 +01:00
|
|
|
filetransferjob.cpp
|
2019-06-02 15:02:21 +01:00
|
|
|
compositefiletransferjob.cpp
|
2014-06-14 14:22:40 +01:00
|
|
|
daemon.cpp
|
|
|
|
device.cpp
|
2023-07-12 17:54:16 +01:00
|
|
|
sslhelper.cpp
|
2019-07-22 20:29:39 +01:00
|
|
|
core_debug.cpp
|
2019-06-02 15:03:11 +01:00
|
|
|
notificationserverinfo.cpp
|
2022-05-12 02:59:56 +01:00
|
|
|
openconfig.cpp
|
2014-06-14 14:22:40 +01:00
|
|
|
)
|
2023-07-20 14:31:40 +01:00
|
|
|
ecm_qt_declare_logging_category(kdeconnectcore
|
|
|
|
HEADER kdeconnect_debug.h
|
|
|
|
IDENTIFIER KDECONNECT_CORE CATEGORY_NAME kdeconnect.core
|
|
|
|
DEFAULT_SEVERITY Warning
|
|
|
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (core)")
|
2014-06-14 14:22:40 +01:00
|
|
|
|
2019-04-30 18:03:24 +01:00
|
|
|
|
2020-07-30 09:53:44 +01:00
|
|
|
target_include_directories(kdeconnectcore PUBLIC ${PROJECT_SOURCE_DIR})
|
2019-04-30 18:03:24 +01:00
|
|
|
|
2023-07-15 21:10:19 +01:00
|
|
|
find_package(OpenSSL REQUIRED COMPONENTS Crypto)
|
2023-07-12 17:54:16 +01:00
|
|
|
|
2014-06-14 14:22:40 +01:00
|
|
|
target_link_libraries(kdeconnectcore
|
|
|
|
PUBLIC
|
2023-07-21 11:24:13 +01:00
|
|
|
Qt::Network
|
2023-12-28 16:37:31 +00:00
|
|
|
KF6::CoreAddons
|
|
|
|
KF6::KIOCore
|
|
|
|
KF6::KIOGui
|
2023-07-12 17:54:16 +01:00
|
|
|
OpenSSL::Crypto
|
2014-06-14 14:22:40 +01:00
|
|
|
PRIVATE
|
2023-07-21 11:24:13 +01:00
|
|
|
Qt::DBus
|
2023-12-28 16:37:31 +00:00
|
|
|
KF6::I18n
|
|
|
|
KF6::ConfigCore
|
2014-06-14 14:22:40 +01:00
|
|
|
)
|
2014-07-01 22:59:38 +01:00
|
|
|
|
2023-07-12 22:10:24 +01:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(kdeconnectcore PRIVATE ws2_32.lib) # winsock2
|
|
|
|
endif()
|
|
|
|
|
2017-05-24 22:52:18 +01:00
|
|
|
if (BLUETOOTH_ENABLED)
|
|
|
|
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_BLUETOOTH)
|
2023-12-28 16:37:31 +00:00
|
|
|
target_link_libraries(kdeconnectcore PRIVATE Qt6::Bluetooth)
|
2017-05-24 22:52:18 +01:00
|
|
|
endif()
|
|
|
|
|
2019-03-13 00:30:24 +00:00
|
|
|
if (LOOPBACK_ENABLED)
|
|
|
|
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_LOOPBACK)
|
|
|
|
endif()
|
|
|
|
|
2023-07-10 17:40:57 +01:00
|
|
|
if (MDNS_ENABLED)
|
|
|
|
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_MDNS)
|
|
|
|
endif()
|
|
|
|
|
2014-06-30 00:12:24 +01:00
|
|
|
set_target_properties(kdeconnectcore PROPERTIES
|
|
|
|
VERSION ${KDECONNECT_VERSION}
|
|
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
|
|
|
)
|
|
|
|
|
2015-09-10 14:51:38 +01:00
|
|
|
generate_export_header(kdeconnectcore EXPORT_FILE_NAME kdeconnectcore_export.h BASE_NAME KDEConnectCore)
|
2014-06-14 14:22:40 +01:00
|
|
|
|
2022-04-20 23:50:14 +01:00
|
|
|
install(TARGETS kdeconnectcore EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
|