试图交叉编译 QT 应用程序。在SDK和导出环境中继承qt5的东西后,我可以通过在终端上手动调用cmake
和命令成功构建应用程序。make
但是我无法通过运行下面提供的脚本来构建相同的应用程序:
src/example-App$./app-qt5-build.sh
它抛出错误:
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
应用程序-qt5-build.sh:
#!/bin/bash
source sdk/environment-setup-cortexa9hf-neon-linux-gnueabi
TargetPath="/sdk/sysroots/zc702-zynq-linux/"
if [ -d build ] ; then
rm -rf build
fi
mkdir build && pushd build
export TargetPath
cmake -G "Unix Makefiles" ..
make -j 4
popd
这个脚本出了什么问题?你能给我一些提示吗?
手动cmake
命令构建成功。