From ad405727ed66039ee0970968dd5e7e32042d65f9 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 5 Jun 2021 22:48:34 +0200 Subject: [PATCH] Link to libvlc. --- custom_modules/libvlc/SCsub | 5 ++++ custom_modules/libvlc/detect.py | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 custom_modules/libvlc/SCsub create mode 100644 custom_modules/libvlc/detect.py diff --git a/custom_modules/libvlc/SCsub b/custom_modules/libvlc/SCsub new file mode 100644 index 0000000..51c89aa --- /dev/null +++ b/custom_modules/libvlc/SCsub @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +Import("env") + +#env.Prepend(LINKFLAGS=["-lvlc"]) diff --git a/custom_modules/libvlc/detect.py b/custom_modules/libvlc/detect.py new file mode 100644 index 0000000..e86f590 --- /dev/null +++ b/custom_modules/libvlc/detect.py @@ -0,0 +1,46 @@ +import os +import platform +import sys + + +def is_active(): + return True + + +def get_name(): + return "sdl2" + + +def can_build(): + if os.name == "posix" or sys.platform == "darwin": + x11_error = os.system("pkg-config --version > /dev/null") + if x11_error: + return False + + libevent_err = os.system("pkg-config libvlc --modversion --silence-errors > /dev/null ") + + if libevent_err: + print("libvlc not found!") + return False + + print("libvlc found!") + + return True + + return False + + +def get_opts(): + return [] + +def get_flags(): + + return [] + + +def configure(env): + env.ParseConfig("pkg-config libvlc --cflags --libs") + + env.Append(CPPDEFINES=["VLC_PRESENT"]) + +