我尝试在 Qt Project Git Repository Browser 上找到存储库。我在搜索字段中输入了消息“qmake”。我收到一条消息“未找到存储库”。
QMake 开源吗?
qmake源位于qtbase树中,例如在github上官方Qt存储库镜像->https://github.com/qt/qtbase/tree/5.10/qmake
我尝试从源代码构建 Vulkan SDK,并且 Vulkan SDK 中的 VulkanCapsViewer 存储库需要 qmake。 (它给出了错误:
qmake: command not found
)
我尝试仅构建 qmake,并且成功了,但是 VulkanCapsViewer 还需要一些其他 QT 模块(核心网络小部件 gui),但我最终没有构建。
虽然qtbase存储库包含大量代码,但可以关闭大部分功能并仅构建qmake。
qtbase
中的配置脚本可以使用以下命令给出所有功能的列表:
./configure -list-features
我使用以下配置选项仅构建qmake,几乎没有其他任何东西。我仍然需要编辑 1-2 个源文件才能编译(通过注释掉某些部分)。 qmake 和 Vulkan SDK 所需的功能已在列表末尾启用。
(此列表包含一些重复项,我稍后可能会编辑掉重复项)
./configure --prefix=`pwd`/../qtbase_bin \
-make tools \
-submodules core \
-no-gui \
-no-widgets \
-no-dbus \
-no-accessibility \
-no-slog2 \
-no-ssl \
-no-cups \
-no-fontconfig \
-no-freetype \
-no-harfbuzz \
-no-gtk \
-no-opengl \
-no-opengles3 \
-no-egl \
-no-qpa \
-no-xcb-xlib \
-no-direct2d \
-no-directfb \
-no-eglfs \
-no-gbm \
-no-linuxfb \
-no-xcb \
-no-libudev \
-no-evdev \
-no-libinput \
-no-mtdev \
-no-tslib \
-no-bundled-xcb-xinput \
-no-xkbcommon \
-no-unity-build \
\
-nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-freetype -no-feature-translation -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-gestures -no-feature-dbus \
-no-feature-abstractbutton \
-no-feature-abstractslider \
-no-feature-accessibility \
-no-feature-action \
-no-feature-androiddeployqt \
-no-feature-animation \
-no-feature-appstore-compliant \
-no-feature-batch_test_support \
-no-feature-brotli \
-no-feature-buttongroup \
-no-feature-calendarwidget \
-no-feature-checkbox \
-no-feature-clipboard \
-no-feature-colordialog \
-no-feature-colornames \
-no-feature-columnview \
-no-feature-combobox \
-no-feature-commandlinkbutton \
-no-feature-completer \
-no-feature-concatenatetablesproxymodel \
-no-feature-concurrent \
-no-feature-contextmenu \
-no-feature-cpp-winrt \
-no-feature-cssparser \
-no-feature-cups \
-no-feature-cursor \
-no-feature-datawidgetmapper \
-no-feature-datetimeedit \
-no-feature-datetimeparser \
-no-feature-desktopservices \
-no-feature-dial \
-no-feature-dialog \
-no-feature-dialogbuttonbox \
-no-feature-dnslookup \
-no-feature-dockwidget \
-no-feature-dom \
-no-feature-draganddrop \
-no-feature-dtls \
-no-feature-easingcurve \
-no-feature-effects \
-no-feature-errormessage \
-no-feature-filedialog \
-no-feature-filesystemmodel \
-no-feature-filesystemwatcher \
-no-feature-fontcombobox \
-no-feature-fontdialog \
-no-feature-formlayout \
-no-feature-freetype \
-no-feature-fscompleter \
-no-feature-future \
-no-feature-gestures \
-no-feature-graphicseffect \
-no-feature-graphicsframecapture \
-no-feature-graphicsview \
-no-feature-groupbox \
-no-feature-gssapi \
-no-feature-highdpiscaling \
-no-feature-hijricalendar \
-no-feature-http \
-no-feature-identityproxymodel \
-no-feature-im \
-no-feature-image_heuristic_mask \
-no-feature-image_text \
-no-feature-imageformat_bmp \
-no-feature-imageformat_jpeg \
-no-feature-imageformat_png \
-no-feature-imageformat_ppm \
-no-feature-imageformat_xbm \
-no-feature-imageformat_xpm \
-no-feature-imageformatplugin \
-no-feature-inputdialog \
-no-feature-islamiccivilcalendar \
-no-feature-itemmodel \
-no-feature-itemmodeltester \
-no-feature-itemviews \
-no-feature-jalalicalendar \
-no-feature-keysequenceedit \
-no-feature-label \
-no-feature-lcdnumber \
-no-feature-library \
-no-feature-lineedit \
-no-feature-listview \
-no-feature-listwidget \
-no-feature-localserver \
-no-feature-macdeployqt \
-no-feature-mainwindow \
-no-feature-mdiarea \
-no-feature-menu \
-no-feature-menubar \
-no-feature-messagebox \
-no-feature-mimetype \
-no-feature-movie \
-no-feature-multiprocess \
-no-feature-networkdiskcache \
-no-feature-networkinterface \
-no-feature-networklistmanager \
-no-feature-networkproxy \
-no-feature-ocsp \
-no-feature-openssl-hash \
-no-feature-pdf \
-no-feature-permissions \
-no-feature-picture \
-no-feature-poll-exit-on-error \
-no-feature-printdialog \
-no-feature-printer \
-no-feature-printpreviewdialog \
-no-feature-printpreviewwidget \
-no-feature-process \
-no-feature-processenvironment \
-no-feature-progressbar \
-no-feature-progressdialog \
-no-feature-proxymodel \
-no-feature-pushbutton \
-no-feature-radiobutton \
-no-feature-raster-64bit \
-no-feature-raster-fp \
-no-feature-relocatable \
-no-feature-resizehandler \
-no-feature-rubberband \
-no-feature-sanitize_fuzzer_no_link \
-no-feature-scrollarea \
-no-feature-scrollbar \
-no-feature-scroller \
-no-feature-sessionmanager \
-no-feature-sha3-fast \
-no-feature-sharedmemory \
-no-feature-shortcut \
-no-feature-sizegrip \
-no-feature-slider \
-no-feature-socks5 \
-no-feature-sortfilterproxymodel \
-no-feature-spinbox \
-no-feature-splashscreen \
-no-feature-splitter \
-no-feature-sqlmodel \
-no-feature-sspi \
-no-feature-stackedwidget \
-no-feature-standarditemmodel \
-no-feature-statusbar \
-no-feature-statustip \
-no-feature-stringlistmodel \
-no-feature-style-stylesheet \
-no-feature-syntaxhighlighter \
-no-feature-systemsemaphore \
-no-feature-systemtrayicon \
-no-feature-tabbar \
-no-feature-tabletevent \
-no-feature-tableview \
-no-feature-tablewidget \
-no-feature-tabwidget \
-no-feature-testlib_selfcover \
-no-feature-textbrowser \
-no-feature-textedit \
-no-feature-texthtmlparser \
-no-feature-textmarkdownreader \
-no-feature-textmarkdownwriter \
-no-feature-textodfwriter \
-no-feature-thread \
-no-feature-timezone \
-no-feature-toolbar \
-no-feature-toolbox \
-no-feature-toolbutton \
-no-feature-tooltip \
-no-feature-topleveldomain \
-no-feature-translation \
-no-feature-transposeproxymodel \
-no-feature-treeview \
-no-feature-treewidget \
-no-feature-tuiotouch \
-no-feature-udpsocket \
-no-feature-undocommand \
-no-feature-undogroup \
-no-feature-undostack \
-no-feature-undoview \
-no-feature-valgrind \
-no-feature-validator \
-no-feature-wasm-exceptions \
-no-feature-wasm-simd128 \
-no-feature-whatsthis \
-no-feature-wheelevent \
-no-feature-widgettextcontrol \
-no-feature-windeployqt \
-no-feature-wizard \
\
\
`# needed for qmake` \
-feature-qmake \
-feature-regularexpression \
-feature-settings \
-feature-temporaryfile \
-feature-datestring \
-feature-textdate \
-feature-cborstreamreader \
-feature-cborstreamwriter \
\
\
`# some of the code fails to compile without this` \
-feature-commandlineparser \
-feature-xmlstream \
-feature-xmlstreamreader \
-feature-xmlstreamwriter \
\
\
`# needed by Vulkan SDK / VulkanCapsViewer` \
\
-feature-filesystemiterator \
\
\
`# recommended by the configure script` \
-DQT_NO_FEATURE_AUTO_RESET=ON \
我还需要添加 QMAKESPEC 环境变量以指向包含
mkspec/linux-g++
文件的 qmake.conf
文件夹,以使其与 VulkanCapsViewer 构建脚本一起使用。
export QMAKESPEC=/PATH_TO/qtbase_bin/mkspecs/linux-g++
这是成功的,但我需要启用更多 QT 模块(核心网络小部件 gui)来构建 VulkanCapsViewer 存储库,并且此时禁用构建 VulkanCapsViewer reqpository 更容易(通过在
vulkansdk
中将其注释掉)
脚本)。
也感谢这些其他答案:
https://forum.qt.io/topic/17668/qmake-does-not-sem-to-recognize-linux-g-specation-on-opensuse-12-1