2018-03-17 17:52:45 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
|
2013-07-02 00:50:32 +01:00
|
|
|
project(kdeconnect)
|
2013-08-21 17:25:44 +01:00
|
|
|
|
2019-07-22 23:28:02 +01:00
|
|
|
if (SAILFISHOS)
|
2019-12-09 22:14:19 +00:00
|
|
|
set(KF5_MIN_VERSION "5.36.0")
|
2019-07-22 23:28:02 +01:00
|
|
|
set(QT_MIN_VERSION "5.6.0")
|
|
|
|
else()
|
2019-12-07 17:09:56 +00:00
|
|
|
set(KF5_MIN_VERSION "5.64.0")
|
2019-07-22 23:28:02 +01:00
|
|
|
set(QT_MIN_VERSION "5.10.0")
|
|
|
|
endif()
|
2019-12-09 22:14:19 +00:00
|
|
|
set(QCA_MIN_VERSION "2.1.0")
|
2019-07-22 23:28:02 +01:00
|
|
|
|
2019-06-12 22:48:12 +01:00
|
|
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(ECMAddTests)
|
|
|
|
include(ECMSetupVersion)
|
|
|
|
include(ECMInstallIcons)
|
|
|
|
include(FeatureSummary)
|
|
|
|
include(GenerateExportHeader)
|
2020-03-01 20:00:40 +00:00
|
|
|
if (NOT SAILFISHOS)
|
|
|
|
include(ECMQMLModules)
|
|
|
|
endif()
|
2018-09-06 17:23:11 +01:00
|
|
|
|
2019-06-12 22:48:12 +01:00
|
|
|
include(KDEConnectMacros.cmake)
|
|
|
|
|
2019-12-07 17:14:56 +00:00
|
|
|
ecm_setup_version(1.4.0
|
2019-06-12 22:48:12 +01:00
|
|
|
VARIABLE_PREFIX KDECONNECT
|
|
|
|
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h
|
|
|
|
)
|
2015-02-05 07:52:07 +00:00
|
|
|
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
if (SAILFISHOS)
|
2019-12-09 22:14:19 +00:00
|
|
|
set(KF5_REQUIRED_COMPONENTS I18n CoreAddons Config)
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
set(KF5_OPTIONAL_COMPONENTS)
|
2020-01-17 00:31:53 +00:00
|
|
|
|
2019-12-09 22:14:19 +00:00
|
|
|
set(Qca_LIBRARY CONAN_PKG::Qca-qt5)
|
|
|
|
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
add_definitions(-DSAILFISHOS)
|
|
|
|
else()
|
2019-12-09 22:14:19 +00:00
|
|
|
find_package(Qca-qt5 ${QCA_MIN_VERSION} REQUIRED)
|
|
|
|
set(Qca_LIBRARY qca-qt5)
|
|
|
|
|
Finally, we have support for sending out Battery information.
## Summary
The core idea is as follows:
1. When a Link loads the BatteryPlugin, we query Solid for a list of batteries.
1. If the list is empty, we print a warning message and return quickly
2. Otherwise, we connect *two signals* to every object in that list
2. We send out a single new NetworkPacket as soon as we've processed that list
3. When either of those two signals emits, we send another new NetworkPacket
### Multi-battery Support
BUG: 357193
To handle devices with multiple batteries (requested in that bug), we average
together the battery percentages. This also includes a new field in the packet for
'number of batteries' called `batteryQuantity`. For backwards compatibility, we can
assume it has a default value of one.
This should ensure we support
- devices with no batteries at all (like many desktop machines)
- devices with hot-pluggable batteries (like those laptops with detachable screens)
### Concerns
Note that the implementation isn't perfect.
We'll need some new localizable text to make it clear that we now support sending
battery status information.
Then there's a rather significant question: maybe we should have two battery plugins
on each client, like we do for the `findmyphone`/`findthisdevice` plugins?
## Test Plan
We need to ensure that other clients (including those using the Android codebase)
will respond correctly. The main things to look at are
1. are these new packets sent when the plugin is enabled, and not sent when it's disabled?
2. is the charge percentage accurate?
3. is the charge state (charging, discharging, or full) accurate?
and
4. do we see the correct number of warnings for low-battery?
2020-04-13 06:54:11 +01:00
|
|
|
set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Solid Kirigami2 People)
|
2018-08-06 09:45:53 +01:00
|
|
|
set(KF5_OPTIONAL_COMPONENTS DocTools)
|
2019-10-27 16:02:45 +00:00
|
|
|
|
|
|
|
set_package_properties(KF5Kirigami2 PROPERTIES
|
2019-10-27 16:12:57 +00:00
|
|
|
DESCRIPTION "QtQuick plugins to build user interfaces based on KDE UX guidelines"
|
|
|
|
PURPOSE "Required for KDE Connect's QML-based GUI applications"
|
|
|
|
URL "https://www.kde.org/products/kirigami/"
|
|
|
|
TYPE RUNTIME
|
2019-10-27 16:02:45 +00:00
|
|
|
)
|
|
|
|
|
2019-07-21 23:49:07 +01:00
|
|
|
if(UNIX AND NOT APPLE)
|
2019-10-27 19:41:24 +00:00
|
|
|
find_package(KF5PulseAudioQt)
|
2018-08-06 09:43:38 +01:00
|
|
|
endif()
|
2019-10-27 16:02:45 +00:00
|
|
|
|
|
|
|
find_package(KF5PeopleVCard)
|
|
|
|
set_package_properties(KF5PeopleVCard PROPERTIES
|
|
|
|
PURPOSE "Read vcards from the file system"
|
|
|
|
URL "https://phabricator.kde.org/source/kpeoplevcard/"
|
|
|
|
TYPE RUNTIME
|
|
|
|
)
|
|
|
|
|
2019-12-09 22:14:19 +00:00
|
|
|
add_definitions(-DHAVE_KIO)
|
2020-01-16 17:11:10 +00:00
|
|
|
|
|
|
|
ecm_find_qmlmodule(org.kde.people 1.0)
|
2020-03-17 16:13:12 +00:00
|
|
|
ecm_find_qmlmodule(QtQuick.Particles 2.0)
|
2020-01-16 17:11:10 +00:00
|
|
|
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
endif()
|
2013-06-06 04:57:06 +01:00
|
|
|
|
2019-12-09 22:14:19 +00:00
|
|
|
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS -DQT_NO_CAST_FROM_ASCII)
|
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick Network Multimedia)
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS})
|
|
|
|
if (KF5_OPTIONAL_COMPONENTS)
|
2019-12-09 22:14:19 +00:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS ${KF5_OPTIONAL_COMPONENTS})
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
endif()
|
2015-03-01 20:17:46 +00:00
|
|
|
|
2019-03-30 19:45:54 +00:00
|
|
|
if (NOT ZSH_AUTOCOMPLETE_DIR)
|
|
|
|
set(ZSH_AUTOCOMPLETE_DIR "${CMAKE_INSTALL_PREFIX}/share/zsh/site-functions")
|
|
|
|
endif()
|
|
|
|
|
2019-06-18 02:21:31 +01:00
|
|
|
option(PRIVATE_DBUS_ENABLED "Use private dbus session for kdeconnect" OFF)
|
|
|
|
if(PRIVATE_DBUS_ENABLED OR APPLE)
|
|
|
|
add_compile_definitions(USE_PRIVATE_DBUS)
|
|
|
|
endif()
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
|
2019-10-27 16:11:58 +00:00
|
|
|
add_subdirectory(core)
|
2020-01-06 19:28:36 +00:00
|
|
|
add_subdirectory(plugins)
|
|
|
|
add_subdirectory(interfaces)
|
2019-12-09 22:14:19 +00:00
|
|
|
|
|
|
|
if (NOT SAILFISHOS)
|
|
|
|
add_subdirectory(icon)
|
|
|
|
add_subdirectory(data)
|
|
|
|
add_subdirectory(cli)
|
|
|
|
add_subdirectory(declarativeplugin)
|
|
|
|
|
2019-10-27 16:11:58 +00:00
|
|
|
add_subdirectory(kcm)
|
|
|
|
add_subdirectory(kcmplugin)
|
|
|
|
add_subdirectory(daemon)
|
2019-07-20 12:02:06 +01:00
|
|
|
add_subdirectory(app)
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
add_subdirectory(indicator)
|
|
|
|
add_subdirectory(urlhandler)
|
|
|
|
add_subdirectory(nautilus-extension)
|
2019-04-15 21:36:34 +01:00
|
|
|
add_subdirectory(fileitemactionplugin)
|
2019-10-27 15:53:39 +00:00
|
|
|
add_subdirectory(smsapp)
|
2020-01-17 00:31:53 +00:00
|
|
|
add_subdirectory(settings)
|
|
|
|
|
2019-10-27 16:11:58 +00:00
|
|
|
if(NOT WIN32)
|
|
|
|
add_subdirectory(kio)
|
|
|
|
add_subdirectory(plasmoid)
|
|
|
|
endif()
|
2019-12-09 22:14:19 +00:00
|
|
|
endif()
|
2020-01-17 00:31:53 +00:00
|
|
|
|
2019-12-09 22:14:19 +00:00
|
|
|
if(KF5DocTools_FOUND)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
endif()
|
2019-10-27 16:11:58 +00:00
|
|
|
|
2019-12-09 22:14:19 +00:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
add_subdirectory(tests)
|
Build kdeconnect on sailfish and port some simple plugins
Summary:
Below is a lost of the commits, but, in summary
Port the build system for Sailfish, which means selectively building only the bits we need/can, and only against the KF5 libs that are available.
Allow to build on Qt 5.6
Switch from knotification to nemo notification (not complete!)
Add a very simple example sailfish app.
Note, there is still much missing functionality. Notifications dont work, pairing sort of works but not really, but when it is paired you can send a ping to the desktop client
Dont build kio for Sailfish
Port core build system
Port daemon buld system
Require CoreAddons on Sailfish
Port plugins build for sailfish and include the ping plugin for now
Final build changes for sailfish.
Disable tests and other not needed parts
Add includes for QCA
Fix build errors on sailfish
Get core/ to build on sailfish
Get interfaces/ to build on sailfish
Build daemon on sailfish
On sailfish, dont install the kcm file
Start port plugin to sailfish
Fixup installed files
Add sfos app
Hack declarative plugin to give a public interface
Build sfos app
Compile declarativeplugin into the sfos app for now
Redefine qAsConst for qt 5.6
Packaging fixes
Use official icon
Package .desktop
Reviewers: #kde_connect, apol, nicolasfella, albertvaka
Reviewed By: #kde_connect, apol, nicolasfella, albertvaka
Subscribers: kdeconnect, andyholmes, albertvaka, kossebau, mtijink, vonreth, apol, #kde_connect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10703
2018-08-02 20:10:59 +01:00
|
|
|
endif()
|
2018-03-25 19:40:59 +01:00
|
|
|
|
2015-09-14 12:51:50 +01:00
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|