summaryrefslogtreecommitdiff
path: root/x11/kde4-runtime/files/patch-phonon_kcm_CMakeLists.txt
blob: f2d450c739532e5ac2411ad1d07165361e04470c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Detect libcanberra with CMake, not pkg-config.

The latter does not produce full paths for libraries, leading to build failures
if -L/path/to is not passed to the linker as well.
--- phonon/kcm/CMakeLists.txt
+++ phonon/kcm/CMakeLists.txt
@@ -11,7 +11,11 @@ set_package_properties(GLIB2 PROPERTIES DESCRIPTION "Low-level core library for
                        TYPE OPTIONAL
                       )
 
-pkg_check_modules(CANBERRA libcanberra)
+find_path(CANBERRA_INCLUDE_DIRS canberra.h)
+find_library(CANBERRA_LIBRARIES canberra)
+if (CANBERRA_INCLUDE_DIRS AND CANBERRA_LIBRARIES)
+  set(CANBERRA_FOUND TRUE)
+endif ()
 add_feature_info ("Audio setup GUI" CANBERRA_FOUND
                   "libcanberra is needed for audio setup GUI
                   * http://0pointer.de/lennart/projects/libcanberra"