yolobs-studio/cmake/Modules/FindLibVLC.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.4 KiB
CMake
Raw Permalink Normal View History

2016-08-28 12:07:43 +00:00
# Once done these will be defined:
#
# LIBVLC_FOUND
# LIBVLC_INCLUDE_DIRS
# LIBVLC_LIBRARIES
#
find_package(PkgConfig QUIET)
if (PKG_CONFIG_FOUND)
2019-07-27 12:47:10 +00:00
pkg_check_modules(_VLC QUIET libvlc)
2016-08-28 12:07:43 +00:00
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_lib_suffix 64)
else()
set(_lib_suffix 32)
endif()
find_path(VLC_INCLUDE_DIR
NAMES libvlc.h
HINTS
ENV VLCPath${_lib_suffix}
ENV VLCPath
ENV DepsPath${_lib_suffix}
ENV DepsPath
${VLCPath${_lib_suffix}}
${VLCPath}
${DepsPath${_lib_suffix}}
${DepsPath}
${_VLC_INCLUDE_DIRS}
PATHS
/usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES
vlc include/vlc include)
find_library(VLC_LIB
NAMES ${_VLC_LIBRARIES} VLC libVLC
HINTS
ENV VLCPath${_lib_suffix}
ENV VLCPath
ENV DepsPath${_lib_suffix}
ENV DepsPath
${VLCPath${_lib_suffix}}
${VLCPath}
${DepsPath${_lib_suffix}}
${DepsPath}
${_VLC_LIBRARY_DIRS}
PATHS
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix} lib
libs${_lib_suffix} libs
bin${_lib_suffix} bin
../lib${_lib_suffix} ../lib
../libs${_lib_suffix} ../libs
../bin${_lib_suffix} ../bin)
include(FindPackageHandleStandardArgs)
2020-10-01 20:15:25 +00:00
# OBS doesnt depend on linking, so we dont include VLC_LIB here as required.
find_package_handle_standard_args(LibVLC DEFAULT_MSG VLC_INCLUDE_DIR)
2016-08-28 12:07:43 +00:00
mark_as_advanced(VLC_INCLUDE_DIR VLC_LIB)
if(LIBVLC_FOUND)
set(LIBVLC_LIBRARIES ${VLC_LIB})
2020-10-01 20:15:25 +00:00
set(LIBVLC_INCLUDE_DIRS ${VLC_INCLUDE_DIR})
2016-08-28 12:07:43 +00:00
endif()