summaryrefslogtreecommitdiff
path: root/x11-misc/lightdm-kde/files/lightdm-kde-0.3.2.1-lightdm-1.7.patch
blob: 0e83db26166b296df765612f6d23fad05c1d9a9c (plain)
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
From dacd25fc53ecfd8928464420c21ff52b660a0893 Mon Sep 17 00:00:00 2001
From: Iain Lane <iain.lane@canonical.com>
Date: Thu, 1 Aug 2013 21:37:48 +1000
Subject: [PATCH] FindQLightDM.cmake: Search for new liblightdm-qt-3 as well as
 old liblightdm-qt-2

BUG: 319480
---
 cmake/modules/FindQLightDM.cmake | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/cmake/modules/FindQLightDM.cmake b/cmake/modules/FindQLightDM.cmake
index c055c61..f901cf6 100644
--- a/cmake/modules/FindQLightDM.cmake
+++ b/cmake/modules/FindQLightDM.cmake
@@ -19,10 +19,19 @@ set(QLIGHTDM_LIBRARIES_FIND_REQUIRED ${QLightDM_FIND_REQUIRED})
 find_package(PkgConfig)
 if(PKG_CONFIG_FOUND)
     if (QLIGHTDM_MIN_VERSION)
-        PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-2>=${QLIGHTDM_MIN_VERSION})
+        PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-3>=${QLIGHTDM_MIN_VERSION})
     else (QLIGHTDM_MIN_VERSION)
-        PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-2)
+        PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-3)
     endif (QLIGHTDM_MIN_VERSION)
+    SET (QLIGHTDM_API 3)
+    if (NOT PC_QLIGHTDM_FOUND)
+        if (QLIGHTDM_MIN_VERSION)
+            PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-2>=${QLIGHTDM_MIN_VERSION})
+        else (QLIGHTDM_MIN_VERSION)
+            PKG_CHECK_MODULES(PC_QLIGHTDM liblightdm-qt-2)
+        endif (QLIGHTDM_MIN_VERSION)
+        SET (QLIGHTDM_API 2)
+    endif (NOT PC_QLIGHTDM_FOUND)
 endif(PKG_CONFIG_FOUND)
 
 
@@ -34,7 +43,7 @@ find_path(QLIGHTDM_INCLUDE_DIR
 )
 
 find_library(QLIGHTDM_LIBRARIES
-             NAMES lightdm-qt-2
+             NAMES lightdm-qt-${QLIGHTDM_API}
              HINTS
              ${PC_QLIGHTDM_LIBDIR}
              ${PC_QLIGHTDM_LIBRARY_DIRS}
-- 
1.8.3.2