構建
Qt for iOS
從源要求
Xcode
with Command Line Tools installed. You can install Xcode Command Line Tools directly using
xcode-select –install
from you terminal or as a package using
Homebrew
. Qt sources can be obtained either by cloning the repositories or downloading the source package(s).
To cross-build Qt, you need a host build of Qt first. See 交叉編譯 Qt 瞭解細節。
You can then configure and build Qt. This is done from the Qt top directory:
> ./configure -platform macx-ios-clang -release -qt-host-path <path_to_host_qt_installation>
注意:
configure always uses the
Ninja
generator and build tool if a
ninja
executable is available. Ninja is cross-platform, feature-rich, performant, and recommended on all platforms. The use of other generators might work but is not officially supported.
其它配置選項,見 Qt 配置選項 .
然後,隻需運行
cmake --build . --parallel
.
注意:
默認構建將包括模擬器和設備庫。若想要構建單個目標,使用
-sdk
自變量采用
iphoneos
or
iphonesimulator
.