tdehw: Add libnm dependency

This will ensure that the correct directory is searched by tdehw when
looking for VPN service files.

Signed-off-by: mio <stigma@disroot.org>
pull/338/head
mio 5 months ago
parent 33455e4812
commit 7a30ee5188

@ -1339,6 +1339,20 @@ if( NOT WITH_${DEFAULT_SPELL_CHECKER} )
endif()
#### Check for libnm ############################
if( WITH_NETWORK_MANAGER_BACKEND )
pkg_search_module( LIBNM libnm )
if( NOT LIBNM_FOUND )
tde_message_fatal( "libnm was requested but it was not found on your system." )
endif( NOT LIBNM_FOUND )
pkg_get_variable( NM_VPN_SERVICE_DIR libnm vpnservicedir )
if( "${NM_VPN_SERVICE_DIR}" STREQUAL "" )
set( NM_VPN_SERVICE_DIR "/usr/lib/NetworkManager/VPN" )
endif( "${NM_VPN_SERVICE_DIR}" STREQUAL "" )
endif( WITH_NETWORK_MANAGER_BACKEND )
##### enable TDEIconLoader debugging ############
if ( WITH_TDEICONLOADER_DEBUG )

@ -891,6 +891,9 @@
/* Defined if compiling with the network-manager backend */
#cmakedefine WITH_NETWORK_MANAGER_BACKEND 1
/* Directory where NetworkManager VPN service files are located */
#cmakedefine NM_VPN_SERVICE_DIR "@NM_VPN_SERVICE_DIR@"
/* Defined if compiling with old XDG standard support */
#cmakedefine WITH_OLD_XDG_STD 1

@ -18,6 +18,7 @@
#ifndef _TDENETWORKBACKEND_NETWORKMANAGER_H
#define _TDENETWORKBACKEND_NETWORKMANAGER_H
#include "config.h"
#include "tdenetworkconnections.h"
//====================================================================================================
@ -143,7 +144,7 @@
#define NM_802_11_DEVICE_CAP_RSN 0x20
//====================================================================================================
#define NM_PLUGIN_SERVICE_DIR_ETC "/etc/NetworkManager/VPN" // old plugin location
#define NM_PLUGIN_SERVICE_DIR_LIB "/usr/lib/NetworkManager/VPN" // new plugin location
#define NM_PLUGIN_SERVICE_DIR_LIB NM_VPN_SERVICE_DIR // new plugin location
//====================================================================================================
//====================================================================================================

Loading…
Cancel
Save