vlc-qt编译 linux,ubuntu18.04 编译qt-vlc qt5.12.3

1.源码下载,参考vlc-qt源码目录里面有README.md和BUILDING.md

vlc-qt编译 linux,ubuntu18.04 编译qt-vlc qt5.12.3_第1张图片

git clone git://github.com/vlc-qt/vlc-qt.git

git submodule init

git submodule update

2.编译源码,BUILDING.md里面找到linux编译源码流程

### Linux

Install requirements from your distribution's repository.

Supported generators are `make` and `ninja`.

Make example:

```

$ mkdir build

$ cd build

$ cmake .. -DCMAKE_BUILD_TYPE=Debug

$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/libvlc-qt #(vlc-qt的安装目录,这句是笔者加的)

$ make -j8

$ make install

```

3.下载qt-vlc运行demo

git clone https://github.com/vlc-qt/examples.git

4.编译vlc-qt/examples

1.删除多余文件

使用cmake, rm simple-player.pro src/src.pro

If you want to use CMake, you can delete

simple-player.pro

src/src.pro

使用qmake, rm CMakeLists.txt cmake/* src/CMakeLists.txt -rf

If you want to use qmake, you can delete

CMakeLists.txt

cmake/*

src/CMakeLists.txt

2.配置pro文件

# Edit below for custom library location

LIBS += -L/usr/local/libvlc-qt/lib -lVLCQtCore -lVLCQtWidgets

INCLUDEPATH += /usr/local/libvlc-qt/include

vlc-qt编译 linux,ubuntu18.04 编译qt-vlc qt5.12.3_第2张图片

5.运行效果如下:

vlc-qt编译 linux,ubuntu18.04 编译qt-vlc qt5.12.3_第3张图片

你可能感兴趣的:(vlc-qt编译,linux)