如何在 ubuntu 16.04 上构建 vlc-qt

如何在 ubuntu 16.04 上构建 vlc-qt

我已遵循以下步骤。

1.下载源代码如下

git clone git://github.com/vlc-qt/vlc-qt.git
Cloning into 'vlc-qt'...
remote: Counting objects: 4785, done.
remote: Total 4785 (delta 0), reused 0 (delta 0), pack-reused 4785
Receiving objects: 100% (4785/4785), 3.14 MiB | 833.00 KiB/s, done.
Resolving deltas: 100% (3121/3121), done.
Checking connectivity... done.

2.创建构建目录。

mkdir build

3.准备建立目录。

cd build

4.使用 make 命令作为

ajeet@administrator-OptiPlex-3040:~/vlc-qt/build$ **cmake ..DCMAKE_BUILD_TYPE=Debug**
  -- Building VLC-Qt 1.2.0
  -- Git revision: 9b2f561
  -- The C compiler identification is GNU 5.4.0
  -- The CXX compiler identification is GNU 5.4.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Build statically: OFF
  CMake Error at config/Dependencies.cmake:29 (FIND_PACKAGE):
  By not providing "FindQt5Quick.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Quick",
  but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Quick"
  (requested version 5.2.0) with any of the following names:

    **Qt5QuickConfig.cmake
    qt5quick-config.cmake**

  Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set
  "Qt5Quick_DIR" to a directory containing one of the above files.  If
  "Qt5Quick" provides a separate development package or SDK, be sure it has
  been installed.
  Call Stack (most recent call first):
  CMakeLists.txt:50 (INCLUDE)


  -- Configuring incomplete, errors occurred!
  See also "/home/ajeet/vlc-qt/build/CMakeFiles/CMakeOutput.log".

我尝试调试该问题并找到一些解决方案,sudo apt-get install qt*5-dev但这对我来说不起作用。

任何帮助和建议都将不胜感激提前致谢

答案1

CMake 告诉你缺少了文件Qt5QuickConfig.cmake,它是软件包的一部分qtdeclarative5-dev(使用packages.ubuntu.com)。

编译vlc-qt需要一些可以使用以下方法安装的包:

sudo apt-get install qtdeclarative5-dev libvlccore-dev libvlc-dev

答案2

除了从源代码构建之外,vlc-qt还提供您可以轻松安装的 Ubuntu 软件包。但是您需要添加 ppa,因为它未列在官方存储库(第三方存储库)中。

sudo add-apt-repository ppa:ntadej/tano 
sudo apt update
sudo apt install libvlc-qt

相关内容