如何建立Qtwayland? [英] How to build qtwayland?

查看:745
本文介绍了如何建立Qtwayland?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了一整天的时间尝试在Qt Creator中使用QtWayland.Compositor 1.0.我已经按照所有步骤操作了 https://wiki.qt.io/QtWayland ,但我明白了以下错误.我不知道这是什么意思,那是我第一次接触linux.我在vm上有最新的linux mint.

I spent whole day trying to use QtWayland.Compositor 1.0 in Qt creator. I have followed all the steps from there https://wiki.qt.io/QtWayland but I get the following error. I don't know what does it mean, that is my first contact with linux. I have the newest linux mint on a vm.

$ sudo make install
cd src/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/emil/wayland/qtwayland/src/src.pro -o Makefile ) && make -f Makefile install
make[1]: Entering directory '/home/emil/wayland/qtwayland/src'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/emil/wayland/qtwayland/src'
cd examples/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/emil/wayland/qtwayland/examples/examples.pro -o Makefile ) && make -f Makefile install
make[1]: Entering directory '/home/emil/wayland/qtwayland/examples'
cd wayland/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/emil/wayland/qtwayland/examples/wayland/wayland.pro -o Makefile ) && make -f Makefile install
make[2]: Entering directory '/home/emil/wayland/qtwayland/examples/wayland'
Some of the required modules (qtHaveModule(waylandcompositor) qtConfig(opengl)) are not available.
Skipped.
make[2]: Leaving directory '/home/emil/wayland/qtwayland/examples/wayland'
make[1]: Leaving directory '/home/emil/wayland/qtwayland/examples'

我该如何解决?我要做的就是从Qt安装程序中运行示例:c.

how can I fix that? All I want to do is to run the examples from the Qt installation :c.

推荐答案

Wiki页面上的大部分内容都是在多年前编写的.我已尽力清理我知道不再相关的内容,并希望使Wiki页面处于可用状态.

Most of the content on the wiki page was written many years ago. I made an effort to clean up things I know are not relevant anymore and hope to get the wiki page in a usable state.

我看到的问题是,构建Qt的方法太多,而如何构建QtWayland取决于此.

The problem as I see it, is that there are so many ways to build Qt, and how to build QtWayland depends on that.

两个最常见的选项:

在配置Qt时,可以在配置行中添加-feature-wayland-server.并且它将确保Wayland合成器API是Qt构建的一部分.如果不满足QtWayland的依赖性,则配置将失败. IE.如果您需要Wayland的开发包.

When configuring Qt, you can add -feature-wayland-server to you configure line. And it will make sure the wayland compositor API is part of your Qt build. Configure will then fail if the dependencies of QtWayland is not met. I.e. if you need dev packages for Wayland.

然后,您可以运行make来构建您配置的所有Qt,也可以运行make module-qtwayland来仅构建QtWayland及其所需的依赖项(qtbaseqtdeclarativeqtxmlpatterns)

Then you can either just run make which will build all of Qt as you configured it, or run make module-qtwayland which should only build QtWayland and the required dependencies (qtbase, qtdeclarative, qtxmlpatterns).

首先,您需要找到您想要的Qt版本的qmake.如果是系统提供的,通常已经在您的PATH上了.如果要使用Qt安装程序提供的Qt,对于您的版本和体系结构,通常使用~/Qt/5.10.0/gcc_64/bin/qmake或等效版本.

First you need to find qmake for your desired Qt version. If it's the one provided by the system, it's usually on your PATH already. If you are going to use Qt provided by the Qt installer, it's usually in ~/Qt/5.10.0/gcc_64/bin/qmake or equivalent for your version and architecture.

git clone git://code.qt.io/qt/qtwayland.git
cd qtwayland
git checkout v5.10.0 #or whatever version your qmake reports

使用qmake配置

qmake

~/Qt/5.10.0/gcc_64/bin/qmake

您现在应该看到:

Qt Wayland Client ........................ yes
Qt Wayland Compositor .................... yes

在您的终端中,否则您可能缺少某些依赖项.

In your terminal, or else you are probably missing some dependencies.

make
make install

构建示例

取决于您的配置,这可能需要显式运行:

Build examples

Depending on your configuration, this may need to be run explicitly:

make sub-examples

这篇关于如何建立Qtwayland?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆