Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / phonon / CMakeLists.txt
blobc50721099d566e644cf2f8436d066d2adddeb11d
1 # known limitations:
2 #  xinelib 1.1.1 adds audio
3 #  xinelib 1.1.2 adds audio with gapless playback
4 #  xinelib 1.1.5 + xcb adds video
5 #  xinelib 1.1.7 does not abort() when unplugging a USB device
6 #  xinelib 1.1.9 fixes playback of short sounds
7 #  xinelib 1.2 untested => unsupported
9 # If you want to build KDE without any multimedia support
10 # define the cmake variable KDE4_DISABLE_MULTIMEDIA, i.e,
11 # % cmake -DKDE4_DISABLE_MULTIMEDIA=ON
14 include(UsePkgConfig)
15 OPTION(KDE4_DISABLE_MULTIMEDIA "Disable multimedia support (default: off)" OFF)
17 if(KDE4_DISABLE_MULTIMEDIA)
18    message(STATUS "NOTICE: Multimedia support DISABLED (KDE4_DISABLE_MULTIMEDIA == ON)")
19 else(KDE4_DISABLE_MULTIMEDIA)
20    if (NOT Q_WS_WIN) #no xine on windows to look for, and running the find breaks stuff
21       macro_optional_find_package(Xine)
23       if (NOT Q_WS_MAC) # mac has the qt7 backend, so xine is optional
24           # if no xinelib at all is available say that we want 1.1.9
25           macro_log_feature(XINE_FOUND "Xine" "xine-lib 1.1.x is required for the multimedia backend" "http://sourceforge.net/project/showfiles.php?group_id=9655&package_id=9732" TRUE "1.1.9" "The xine development libraries (v1.1.9 or above) are required to provide audio and video support. Using the latest 1.1.x version is recommended. Run cmake again with the variable KDE4_DISABLE_MULTIMEDIA set if you really want to build KDE without multimedia support (this is not supported)." )
26       endif(NOT Q_WS_MAC)
27       if(XINE_FOUND)
28          string(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\.[0-9]*$" "\\1" XINE_MINOR_VERSION ${XINE_VERSION})
29          string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\." "" XINE_BUGFIX_VERSION ${XINE_VERSION})
30          # if an older xinelib is installed give a warning about problems but continue
31          if(XINE_MINOR_VERSION LESS 2 AND XINE_BUGFIX_VERSION LESS 90)
32             if(XINE_BUGFIX_VERSION LESS 7)
33                if(XINE_BUGFIX_VERSION LESS 5)
34                   macro_log_feature(TRUE "Xine" "xine-lib v${XINE_VERSION} was found on your system. This version does not provide video support and has known security issues. Recommend upgrading to version 1.1.9 or above." "http://sourceforge.net/project/showfiles.php?group_id=9655&package_id=9732")
35                else(XINE_BUGFIX_VERSION LESS 5)
36                   macro_log_feature(TRUE "Xine" "xine-lib v${XINE_VERSION} was found on your system. This version is known to have problems when a device is unplugged. Consider upgrading to version 1.1.9 or above." "http://sourceforge.net/project/showfiles.php?group_id=9655&package_id=9732")
37                endif(XINE_BUGFIX_VERSION LESS 5)
38             else(XINE_BUGFIX_VERSION LESS 7)
39                if(XINE_BUGFIX_VERSION LESS 9)
40                   macro_log_feature(TRUE "Xine" "xine-lib v${XINE_VERSION} was found on your system. This version is known to have problems when playing short sounds. Consider upgrading to version 1.1.9 or above." "http://sourceforge.net/project/showfiles.php?group_id=9655&package_id=9732")
41                endif(XINE_BUGFIX_VERSION LESS 9)
42             endif(XINE_BUGFIX_VERSION LESS 7)
43          else(XINE_MINOR_VERSION LESS 2 AND XINE_BUGFIX_VERSION LESS 90)
44             macro_log_feature(FALSE "Xine" "xine-lib v${XINE_VERSION} was found on your system. This version contains major changes compared to 1.1.x and has not been tested properly for use with this backend. Consider downgrading to version 1.1.9." "http://sourceforge.net/project/showfiles.php?group_id=9655&package_id=9732")
45             set(XINE_FOUND FALSE)
46          endif(XINE_MINOR_VERSION LESS 2 AND XINE_BUGFIX_VERSION LESS 90)
47          macro_optional_add_subdirectory(xine)
48       endif(XINE_FOUND)
49    endif (NOT Q_WS_WIN)
50 endif(KDE4_DISABLE_MULTIMEDIA)