]> git.sesse.net Git - vlc/blob - extras/buildsystem/cmake/include/FindDvbpsi.cmake
Cmake : disable samples downloading & related tests
[vlc] / extras / buildsystem / cmake / include / FindDvbpsi.cmake
1 # - Find library containing Dvbpsi()
2 # The following variables are set if Dvbpsi is found. If Dvbpsi is not
3 # found, Dvbpsi_FOUND is set to false.
4 #  Dvbpsi_FOUND     - System has Dvbpsi.
5 #  Dvbpsi_LIBRARIES - Link these to use Dvbpsi.
6 #  Dvbpsi_CFLAGS - Link these to use Dvbpsi.
7
8
9 if (NOT Dvbpsi_SEARCHED)
10     include(CheckLibraryExists)
11
12     set(Dvbpsi_SEARCHED TRUE CACHE INTERNAL "")
13     set(Dvbpsi_FOUND FALSE CACHE INTERNAL "")
14
15     pkg_check_modules(Dvbpsi dvbpsi)
16
17     if (NOT Dvbpsi_FOUND)
18         find_library(Dvbpsi_LIBRARY NAMES dvbpsi)
19         if (Dvbpsi_LIBRARY)
20               set(Dvbpsi_LIBRARIES "${Dvbpsi_LIBRARY}" CACHE INTERNAL "")
21               set(Dvbpsi_FOUND TRUE CACHE INTERNAL "")
22         endif (Dvbpsi_LIBRARY)
23     endif (NOT Dvbpsi_FOUND)
24
25     if (Dvbpsi_FOUND)
26       if (NOT Dvbpsi_FIND_QUIETLY)
27         message(STATUS "Found Dvbpsi in: ${Dvbpsi_LIBRARIES}")
28       endif (NOT Dvbpsi_FIND_QUIETLY)
29     else (Dvbpsi_FOUND)
30       if (Dvbpsi_FIND_REQUIRED)
31         message(FATAL_ERROR "Could not find the library containing Dvbpsi")
32       endif (Dvbpsi_FIND_REQUIRED)
33     endif (Dvbpsi_FOUND)
34
35     mark_as_advanced(Dvbpsi_LIBRARIES)
36 endif(NOT Dvbpsi_SEARCHED)