aboutsummaryrefslogtreecommitdiff
path: root/modules/FindPhonon.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindPhonon.cmake')
-rw-r--r--modules/FindPhonon.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/FindPhonon.cmake b/modules/FindPhonon.cmake
new file mode 100644
index 00000000..54206a04
--- /dev/null
+++ b/modules/FindPhonon.cmake
@@ -0,0 +1,28 @@
+# Find libphonon
+# Once done this will define
+#
+# PHONON_FOUND - system has Phonon Library
+# PHONON_INCLUDES - the Phonon include directory
+# PHONON_LIBS - link these to use Phonon
+
+# Copyright (c) 2008, Matthias Kretz <kretz@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(PHONON_FOUND)
+ # Already found, nothing more to do
+else(PHONON_FOUND)
+ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+ set(PHONON_FIND_QUIETLY TRUE)
+ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+
+ find_library(PHONON_LIBRARY NAMES phonon PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR} ${LIB_INSTALL_DIR} NO_DEFAULT_PATH)
+ set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
+
+ find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} NO_DEFAULT_PATH)
+ mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY)
+
+ set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
+ message(STATUS "Found Phonon: ${PHONON_LIBRARY})
+endif(PHONON_FOUND)