Created
October 16, 2022 02:43
-
-
Save ZachBacon/e056b3e2dae30ec9c65785c13816ba6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Try to find VLC library | |
# Once done this will define | |
# | |
# VLC_FOUND - system has VLC | |
# VLC_INCLUDE_DIR - The VLC include directory | |
# VLC_LIBRARIES - The libraries needed to use VLC | |
# VLC_DEFINITIONS - Compiler switches required for using VLC | |
# | |
# Copyright (C) 2008, Tanguy Krotoff <tkrotoff@gmail.com> | |
# Copyright (C) 2008, Lukas Durfina <lukas.durfina@gmail.com> | |
# Copyright (c) 2009, Fathi Boudra <fboudra@gmail.com> | |
# | |
# Redistribution and use is allowed according to the terms of the BSD license. | |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | |
# | |
if(VLC_INCLUDE_DIR AND VLC_LIBRARIES) | |
# in cache already | |
set(VLC_FIND_QUIETLY TRUE) | |
endif(VLC_INCLUDE_DIR AND VLC_LIBRARIES) | |
# use pkg-config to get the directories and then use these values | |
# in the FIND_PATH() and FIND_LIBRARY() calls | |
find_package(PkgConfig) | |
pkg_check_modules(VLC libvlc>=3.0.17) | |
set(VLC_DEFINITIONS ${VLC_CFLAGS}) | |
set(VLC_LIBRARIES ${VLC_LDFLAGS}) | |
find_path(VLC_INCLUDE_DIR | |
NAMES vlc.h | |
PATHS ${VLC_INCLUDE_DIRS} | |
PATH_SUFFIXES vlc) | |
find_library(VLC_LIBRARIES | |
NAMES vlc | |
PATHS ${VLC_LIBRARY_DIRS}) | |
include(FindPackageHandleStandardArgs) | |
find_package_handle_standard_args(VLC DEFAULT_MSG VLC_INCLUDE_DIR VLC_LIBRARIES) | |
# show the VLC_INCLUDE_DIR and VLC_LIBRARIES variables only in the advanced view | |
mark_as_advanced(VLC_INCLUDE_DIR VLC_LIBRARIES) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment