交叉编译Qt
1、交叉编译脚本
点击查看代码
#!/bin/bash
OPENSSL_LIBS='-L/home/Qt/make_qt/qt5150/qt5150-linuxfb/openssl/openssl-1.1.1g/aarch64_build/lib -lssl -lcrypto' \
./configure \
-openssl-linked \
-I/home/Qt/make_qt/qt5150/qt5150-linuxfb/openssl/openssl-1.1.1g/aarch64_build/include \
-L'/home/Qt/make_qt/qt5150/qt5150-linuxfb/openssl/openssl-1.1.1g/aarch64_build/lib -Wl,-rpath=/home/Qt/make_qt/qt5150/qt5150-linuxfb/openssl/openssl-1.1.1g/aarch64_build/lib' \
-release \
-xplatform linux-aarch64-gnu-g++ \
-c++std c++11 \
-prefix /opt/aarch64/ \
-opensource -confirm-license \
-make libs \
-no-opengl \
-nomake tools \
-nomake examples \
-nomake tests \
-skip qt3d \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtgamepad \
-skip qtlocation \
-skip qtmacextras \
-skip qtmultimedia \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtsensors \
-skip qtspeech \
-skip qttools \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebsockets \
-skip qtwebview \
-skip qtwinextras \
-skip qtx11extras \
-no-feature-iconv \
-no-feature-gestures \
点击查看代码
#
# qmake configuration for building with aarch64-linux-gnu-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = aarch64-linux-gnu-gcc
QMAKE_CXX = aarch64-linux-gnu-g++
QMAKE_LINK = aarch64-linux-gnu-g++
QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++
# modifications to linux.conf
QMAKE_AR = aarch64-linux-gnu-ar cqs
QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy
QMAKE_NM = aarch64-linux-gnu-nm -P
QMAKE_STRIP = aarch64-linux-gnu-strip
load(qt_config)

浙公网安备 33010602011771号