mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 03:41:27 +02:00
Use version instead of compile check to determine for VLC feature detection
This commit is contained in:
@@ -22,15 +22,6 @@ find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
|
||||
|
||||
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
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <vlc/libvlc.h>
|
||||
#include <vlc/libvlc_media.h>
|
||||
#include <vlc/libvlc_version.h>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -420,7 +421,7 @@ MusicScanner::readTags( const QFileInfo& fi, libvlc_instance_t* vlcInstance )
|
||||
m["size"] = (unsigned int)fi.size();
|
||||
m["mimetype"] = mimetype;
|
||||
|
||||
#ifdef HAVE_VLC_ALBUMARTIST
|
||||
#if (LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0))
|
||||
libvlc_media_t* media = libvlc_media_new_path( vlcInstance, fi.canonicalFilePath().toUtf8().constData() );
|
||||
libvlc_media_parse( media );
|
||||
|
||||
|
Reference in New Issue
Block a user