]> git.pld-linux.org Git - packages/phonon-backend-vlc.git/blob - phonon-backend-vlc-FindPhonon.cmake.patch
- added phonon-backend-vlc-FindPhonon.cmake.patch
[packages/phonon-backend-vlc.git] / phonon-backend-vlc-FindPhonon.cmake.patch
1 --- ./cmake/modules/FindPhonon.cmake.old        2012-02-08 21:25:21.000000000 +0100
2 +++ ./cmake/modules/FindPhonon.cmake    2012-02-08 21:25:36.000000000 +0100
3 @@ -1,53 +1,18 @@
4  # Find Phonon
5  
6  # Copyright (c) 2010, Harald Sitter <sitter@kde.org>
7 +# Copyright (c) 2011, Alexander Neundorf <neundorf@kde.org>
8  #
9  # Redistribution and use is allowed according to the terms of the BSD license.
10  # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
11  
12 -if (NOT PHONON_BUILDSYSTEM_DIR)
13 -    find_program(PC_EXECUTABLE NAMES pkg-config
14 -    PATH_SUFFIXES bin               
15 -    HINTS
16 -    ${CMAKE_INSTALL_PREFIX}
17 -    ONLY_CMAKE_FIND_ROOT_PATH
18 -    )
19 -
20 -    if (NOT PC_EXECUTABLE)
21 -        if (Phonon_FIND_REQUIRED)
22 -            message(FATAL_ERROR "ERROR: Could not find pkg-config [required to find Phonon].")
23 -        endif (Phonon_FIND_REQUIRED)
24 -    endif (NOT PC_EXECUTABLE)
25 -
26 -    if (PC_EXECUTABLE)
27 -        execute_process(COMMAND "${PC_EXECUTABLE}" --variable=buildsystemdir phonon
28 -                        OUTPUT_VARIABLE _data_DIR
29 -                        ERROR_QUIET
30 -                        OUTPUT_STRIP_TRAILING_WHITESPACE)
31 -        file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
32 -        find_path(PHONON_BUILDSYSTEM_DIR FindPhononInternal.cmake HINTS ${_data_DIR})
33 -    endif (PC_EXECUTABLE)
34 -endif (NOT PHONON_BUILDSYSTEM_DIR)
35 -
36 -if (PHONON_BUILDSYSTEM_DIR)
37 +find_package(Phonon NO_MODULE)
38 +if(PHONON_FOUND)
39      set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
40 +endif()
41 +
42 +include(FindPackageHandleStandardArgs)
43 +
44 +find_package_handle_standard_args(Phonon  DEFAULT_MSG  Phonon_DIR )
45 +
46  
47 -    if (Phonon_FIND_REQUIRED)
48 -        set(_req REQUIRED)
49 -    endif (Phonon_FIND_REQUIRED)
50 -    if (PHONON_FIND_QUIETLY)
51 -        set(_quiet QUIET)
52 -    endif (PHONON_FIND_QUIETLY)
53 -
54 -    find_package(PhononInternal ${_req} ${_quiet})
55 -else (PHONON_BUILDSYSTEM_DIR)
56 -    if (_data_DIR)
57 -        if (Phonon_FIND_REQUIRED)
58 -            message(FATAL_ERROR "ERROR: FindPhonon.cmake not found in ${_data_DIR}")
59 -        endif (Phonon_FIND_REQUIRED)
60 -    else (_data_DIR)
61 -        if (Phonon_FIND_REQUIRED)
62 -            message(FATAL_ERROR "ERROR: Either pkg-config can not find its phonon config, or you are not using a recent enough Phonon version.")
63 -        endif (Phonon_FIND_REQUIRED)
64 -    endif (_data_DIR)
65 -endif (PHONON_BUILDSYSTEM_DIR)
This page took 0.049843 seconds and 3 git commands to generate.