mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 22:38:33 +01:00
40 lines
908 B
CMake
40 lines
908 B
CMake
find_package(PkgConfig QUIET)
|
|
pkg_check_modules(PC_LIBVLC QUIET libvlc)
|
|
set(LIBVLC_DEFINITIONS ${PC_LIBVLC_CFLAGS_OTHER})
|
|
|
|
find_path(LIBVLC_INCLUDE_DIR vlc/vlc.h
|
|
HINTS
|
|
${PC_LIBVLC_INCLUDEDIR}
|
|
${PC_LIBVLC_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(LIBVLC_LIBRARY NAMES vlc libvlc
|
|
HINTS
|
|
${PC_LIBVLC_LIBDIR}
|
|
${PC_LIBVLC_LIBRARY_DIRS}
|
|
)
|
|
|
|
find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
|
|
HINTS
|
|
${PC_LIBVLC_LIBDIR}
|
|
${PC_LIBVLC_LIBRARY_DIRS}
|
|
)
|
|
|
|
set(LIBVLC_VERSION ${PC_LIBVLC_VERSION})
|
|
|
|
include(CheckCXXSourceCompiles)
|
|
check_cxx_source_compiles("
|
|
#include <vlc/libvlc.h>
|
|
#include <vlc/libvlc_media.h>
|
|
int main(int argc, char *argv[]) {
|
|
libvlc_meta_t meta = libvlc_meta_AlbumArtist;
|
|
}"
|
|
HAVE_VLC_ALBUMARTIST)
|
|
|
|
find_package_handle_standard_args(LibVLC
|
|
REQUIRED_VARS LIBVLC_LIBRARY LIBVLCCORE_LIBRARY LIBVLC_INCLUDE_DIR
|
|
VERSION_VAR LIBVLC_VERSION
|
|
)
|
|
|
|
|