summaryrefslogtreecommitdiff
path: root/kde-frameworks/knotifyconfig/files/knotifyconfig-5.53.0-phonon-optional.patch
blob: 0854b76da840579843c9e7e08d393d633e2fbd85 (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
From 78a1dcc794f57be993ada7c6f129586ebb6b181e Mon Sep 17 00:00:00 2001
From: Heiko Becker <heirecka@exherbo.org>
Date: Mon, 10 Dec 2018 16:15:08 +0100
Subject: Fix build without Phonon

Summary:
f6d55baf5aa88eaab6b2f96c025064f081d13cea replaced ${PHONON_LIBS} with
Phonon's imported target. This breaks in the case when Phonon isn't
found or disabled via -DCMAKE_DISABLE_FIND_PACKAGES_Phonon4Qt5=TRUE
because the imported target isn't known. It worked previously because
${PHONON_LIBS} was just empty when Phonon wasn't available.

Test Plan:
Building without phonon works now and and it still builds
with phonon available and successfully links to it.

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D17479
---
 src/CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3dd0039..b93cabc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -27,9 +27,15 @@ target_link_libraries(KF5NotifyConfig
         PRIVATE
             KF5::I18n
             KF5::KIOWidgets     # KUrlRequester
-            Phonon::phonon4qt5
             Qt5::DBus)
 
+if(HAVE_PHONON)
+    target_link_libraries(KF5NotifyConfig
+        PRIVATE
+            Phonon::phonon4qt5
+    )
+endif()
+
 set_target_properties(KF5NotifyConfig PROPERTIES
    VERSION      ${KNOTIFYCONFIG_VERSION_STRING}
    SOVERSION    ${KNOTIFYCONFIG_SOVERSION}
-- 
cgit v1.1