构建
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).
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
.