Merge topic 'cuda_add_12.8_new_sm_support'
[kiteware-cmake.git] / Modules / FindMPEG.cmake
blob900ee360feb2da63ea5368ce9ef692814b734a09
1 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
4 #[=======================================================================[.rst:
5 FindMPEG
6 --------
8 Find the native MPEG includes and library
10 This module defines
14   MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
15   MPEG_LIBRARIES, the libraries required to use MPEG.
16   MPEG_FOUND, If false, do not try to use MPEG.
18 also defined, but not for general use are
22   MPEG_mpeg2_LIBRARY, where to find the MPEG library.
23   MPEG_vo_LIBRARY, where to find the vo library.
24 #]=======================================================================]
26 find_path(MPEG_INCLUDE_DIR
27   NAMES mpeg2.h mpeg2dec/mpeg2.h mpeg2dec/include/video_out.h)
29 find_library(MPEG_mpeg2_LIBRARY mpeg2)
31 find_library(MPEG_vo_LIBRARY vo)
33 include(FindPackageHandleStandardArgs)
34 find_package_handle_standard_args(MPEG DEFAULT_MSG MPEG_mpeg2_LIBRARY MPEG_INCLUDE_DIR)
36 if(MPEG_FOUND)
37   set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} )
38   if(MPEG_vo_LIBRARY)
39     list(APPEND MPEG2_LIBRARIES ${MPEG_vo_LIBRARY})
40   endif()
41 endif()
43 mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)