VLC-Qt can be built with any common compiler (g++, clang, MSVC, MinGW). Build files are generated using CMake (3.0.2 or later).
First of all, you need update the config.cmake to set the required build configurations.
QT_SDK_DIR
: Qt sdk directory.LIBVLC_VERSION
: set VLC version you are compiling with to disable unsupported features, should be defined as base 16 integer like0x020200
, defaults to latest stable VLC versionLIBVLC_LIBRARY
: the path of libvlc.libLIBVLCCORE_LIBRARY
: the path of libvlccore.libLIBVLC_INCLUDE_DIR
: the directory of libvlc-sdk header filesLIBVLC_BIN_DIR
: the directory of libvlc-sdk bin filesPROJECT_VERSION_MAJOR
: the VLC-Qt library major version, need same as VERSION filePROJECT_VERSION_MINOR
: the VLC-Qt library minor version, need same as VERSION filePROJECT_VERSION_PATCH
: the VLC-Qt library patch version, need same as VERSION fileSTATIC
: build statically, OFF by defaultSYSTEM_QML
: detect and install to system QML location, OFF by default
Extra platform specific flags:
WITH_GLES
: link OpenGL ES v2 on Windows, OFF by default, only needed for Qt 5.4 and lower (deprecated)WITH_HOMEBREW
: let system know you are using Homebrew provided Qt, OFF by default, macOS onlyWITH_X11
: link with X11, required by some Linux distributions, OFF by default
Building in separate build
directory is recommended.
Download libvlc sdk from http://download.videolan.org/pub/videolan/vlc/, such as
vlc-3.0.16-win32.7z
You need to prepare VLC libraries and plugins before building. After cmake
run
make prepare
, then re-run cmake
. Build as a normal library or application.
Supported generators are make
and ninja
.
Qt in PATH
and VLC in /Applications
will be used.
Make example:
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
$ make prepare
$ cmake ..
$ make -j8
$ make install
Build as a normal library or application.
Make sure you always use debug libraries with debug build and release libraries with release build after using it in your project.
Supported generators for MSVC are nmake
, jom
and ninja
;
for MinGW: mingw32-make
and ninja
.
Simple example:
mkdir build && cd build
cmake .. && cmake --build .
Install requirements from your distribution's repository.
Supported generators are make
and ninja
.
Make example:
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
$ make -j8
$ make install