Commit f98d6a45 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Find libdvbpsi, libmpeg2.

parent 8eff8faa
# - Find library containing Dvbpsi()
# The following variables are set if Dvbpsi is found. If Dvbpsi is not
# found, Dvbpsi_FOUND is set to false.
# Dvbpsi_FOUND - System has Dvbpsi.
# Dvbpsi_LIBRARIES - Link these to use Dvbpsi.
# Dvbpsi_CFLAGS - Link these to use Dvbpsi.
if (NOT Dvbpsi_SEARCHED)
include(CheckLibraryExists)
set(Dvbpsi_SEARCHED TRUE CACHE INTERNAL "")
set(Dvbpsi_FOUND FALSE CACHE INTERNAL "")
pkg_check_modules(Dvbpsi dvbpsi)
if (NOT Dvbpsi_FOUND)
find_library(Dvbpsi_LIBRARY NAMES dvbpsi)
if (Dvbpsi_LIBRARY)
set(Dvbpsi_LIBRARIES "${Dvbpsi_LIBRARY}" CACHE INTERNAL "")
set(Dvbpsi_FOUND TRUE CACHE INTERNAL "")
endif (Dvbpsi_LIBRARY)
endif (NOT Dvbpsi_FOUND)
if (Dvbpsi_FOUND)
if (NOT Dvbpsi_FIND_QUIETLY)
message(STATUS "Found Dvbpsi in: ${Dvbpsi_LIBRARIES}")
endif (NOT Dvbpsi_FIND_QUIETLY)
else (Dvbpsi_FOUND)
if (Dvbpsi_FIND_REQUIRED)
message(FATAL_ERROR "Could not find the library containing Dvbpsi")
endif (Dvbpsi_FIND_REQUIRED)
endif (Dvbpsi_FOUND)
mark_as_advanced(Dvbpsi_LIBRARIES)
endif(NOT Dvbpsi_SEARCHED)
# - Find library containing Mpeg2()
# The following variables are set if Mpeg2 is found. If Mpeg2 is not
# found, Mpeg2_FOUND is set to false.
# Mpeg2_FOUND - System has Mpeg2.
# Mpeg2_LIBRARIES - Link these to use Mpeg2.
# Mpeg2_CFLAGS - Link these to use Mpeg2.
if (NOT Mpeg2_SEARCHED)
include(CheckLibraryExists)
set(Mpeg2_SEARCHED TRUE CACHE INTERNAL "")
set(Mpeg2_FOUND FALSE CACHE INTERNAL "")
pkg_check_modules(Mpeg2 mpeg2)
if (NOT Mpeg2_FOUND)
find_library(Mpeg2_LIBRARY NAMES mpeg2)
if (Mpeg2_LIBRARY)
set(Mpeg2_LIBRARIES "${Mpeg2_LIBRARY}" CACHE INTERNAL "")
set(Mpeg2_FOUND TRUE CACHE INTERNAL "")
endif (Mpeg2_LIBRARY)
endif (NOT Mpeg2_FOUND)
if (Mpeg2_FOUND)
if (NOT Mpeg2_FIND_QUIETLY)
message(STATUS "Found Mpeg2 in: ${Mpeg2_LIBRARIES}")
endif (NOT Mpeg2_FIND_QUIETLY)
else (Mpeg2_FOUND)
if (Mpeg2_FIND_REQUIRED)
message(FATAL_ERROR "Could not find the library containing Mpeg2")
endif (Mpeg2_FIND_REQUIRED)
endif (Mpeg2_FOUND)
mark_as_advanced(Mpeg2_LIBRARIES)
endif(NOT Mpeg2_SEARCHED)
...@@ -120,6 +120,10 @@ set(CMAKE_EXTRA_INCLUDE_FILES arpa/inet.h) ...@@ -120,6 +120,10 @@ set(CMAKE_EXTRA_INCLUDE_FILES arpa/inet.h)
vlc_check_functions_exist(inet_aton inet_ntop inet_pton) vlc_check_functions_exist(inet_aton inet_ntop inet_pton)
set(CMAKE_EXTRA_INCLUDE_FILES) set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_EXTRA_INCLUDE_FILES sys/mman.h)
vlc_check_functions_exist(mmap)
set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_REQUIRED_LIBRARIES) set(CMAKE_REQUIRED_LIBRARIES)
check_library_exists(poll poll "" HAVE_POLL) check_library_exists(poll poll "" HAVE_POLL)
...@@ -491,6 +495,23 @@ if(X11_FOUND) ...@@ -491,6 +495,23 @@ if(X11_FOUND)
vlc_module_add_link_libraries(panoramix ${X11_LIBRARIES}) vlc_module_add_link_libraries(panoramix ${X11_LIBRARIES})
endif(X11_FOUND) endif(X11_FOUND)
find_package(Mpeg2)
if(Mpeg2_FOUND)
vlc_enable_modules(libmpeg2)
check_include_files ("stdint.h;mpeg2dec/mpeg2.h" HAVE_MPEG2DEC_MPEG2_H)
vlc_module_add_link_libraries(libmpeg2 ${Mpeg2_LIBRARIES})
endif(Mpeg2_FOUND)
find_package(Dvbpsi)
if(Dvbpsi_FOUND)
vlc_enable_modules(ts)
set(CMAKE_REQUIRED_INCLUDES ${CONTRIB_INCLUDE})
check_include_files ("stdint.h;dvbpsi/dvbpsi.h;dvbpsi/demux.h;dvbpsi/descriptor.h;dvbpsi/pat.h;dvbpsi/pmt.h;dvbpsi/sdt.h;dvbpsi/dr.h" HAVE_DVBPSI_DR_H)
vlc_module_add_link_libraries(ts ${Dvbpsi_LIBRARIES})
endif(Dvbpsi_FOUND)
set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_INCLUDES)
########################################################### ###########################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment