Package: kde-runtime / 4:17.08.3-2.1

cmake-add-NetworkManager-module.patch Patch series | 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
From 5711ab8b4b053e5d2f4f0b5831ff2a1d37cdf9fa Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 19 Dec 2017 19:45:23 +0100
Subject: [PATCH] cmake: add NetworkManager module

This one looks for libnm as opposed to the deprecated libnm-glib.
---
 cmake/modules/FindNetworkManager.cmake | 40 ++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 cmake/modules/FindNetworkManager.cmake

Index: kde-runtime-17.08.3/cmake/modules/FindNetworkManager.cmake
===================================================================
--- /dev/null
+++ kde-runtime-17.08.3/cmake/modules/FindNetworkManager.cmake
@@ -0,0 +1,40 @@
+# - Try to find NetworkManager
+# Once done this will define
+#
+#  NETWORKMANAGER_FOUND - system has NetworkManager
+#  NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories
+#  NETWORKMANAGER_LIBRARIES - the libraries needed to use NetworkManager
+#  NETWORKMANAGER_CFLAGS - Compiler switches required for using NetworkManager
+#  NETWORKMANAGER_VERSION - version number of NetworkManager
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+# Copyright (c) 2007, Will Stephenson, <wstephenson@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+IF (NETWORKMANAGER_INCLUDE_DIRS)
+   # in cache already
+   SET(NetworkManager_FIND_QUIETLY TRUE)
+ENDIF (NETWORKMANAGER_INCLUDE_DIRS)
+
+IF (NOT WIN32)
+   # use pkg-config to get the directories and then use these values
+   # in the FIND_PATH() and FIND_LIBRARY() calls
+   find_package(PkgConfig)
+   PKG_SEARCH_MODULE( NETWORKMANAGER libnm )
+ENDIF (NOT WIN32)
+
+IF (NETWORKMANAGER_FOUND)
+   IF (NOT NetworkManager_FIND_QUIETLY)
+      MESSAGE(STATUS "Found libnm ${NETWORKMANAGER_VERSION}: ${NETWORKMANAGER_LIBRARY_DIRS}")
+   ENDIF (NOT NetworkManager_FIND_QUIETLY)
+ELSE (NETWORKMANAGER_FOUND)
+   IF (NetworkManager_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could NOT find libnm, check FindPkgConfig output above!")
+   ENDIF (NetworkManager_FIND_REQUIRED)
+ENDIF (NETWORKMANAGER_FOUND)
+
+MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS)
+