Commit 42723bb3 authored by Arfrever Frehtes Taifersar Arahesis's avatar Arfrever Frehtes Taifersar Arahesis Committed by Andreas Sturmlechner

Make dependency on KF5NetworkManagerQt optional

Reviewers: #plasma, ivan

Reviewed By: #plasma, ivan

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13255
parent 37fa95d2
......@@ -58,8 +58,11 @@ find_package (
KIO
Plasma
WidgetsAddons
NetworkManagerQt
)
find_package (KF5NetworkManagerQt ${KF5_DEP_VERSION})
if (KF5NetworkManagerQt_FOUND)
set (HAVE_NETWORKMANAGER TRUE)
endif()
find_package (KF5SysGuard REQUIRED)
include_directories (
......
configure_file (config-plasma-vault.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma-vault.h)
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/engine
......@@ -85,8 +87,13 @@ target_link_libraries (
KF5::SysGuard
KF5::WidgetsAddons
KF5::ProcessCore
KF5::NetworkManagerQt
)
if (HAVE_NETWORKMANAGER)
target_link_libraries (
kded_plasmavault
KF5::NetworkManagerQt
)
endif ()
install (
......
#cmakedefine HAVE_NETWORKMANAGER
......@@ -37,7 +37,23 @@
#include <functional>
#include <config-plasma-vault.h>
#ifdef HAVE_NETWORKMANAGER
#include <NetworkManagerQt/Manager>
#else
namespace NetworkManager
{
bool isNetworkingEnabled()
{
return true;
}
void setNetworkingEnabled(bool enabled)
{
Q_UNUSED(enabled);
}
}
#endif
K_PLUGIN_FACTORY_WITH_JSON(PlasmaVaultServiceFactory,
"plasmavault.json",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment