我正在尝试使用 Qt Creator 和 CMake 在我的 Qt 应用程序中添加aws-sdk-cpp作为子模块。我希望它可以为任何平台构建,而无需按照此处所述在命令行上进行构建和安装。
我的项目结构和 CMakeLists.txt 文件如下所示:
我已经使用 Qt Creator 在调试模式下使用 MSVC2019 成功构建了整个 aws-sdk-cpp。我的项目构建文件夹现在是 15 GB,包含所有构建的库。我现在面临的当前问题是这个错误:
CMake Error at app/CMakeLists.txt:23 (find_package):
By not providing "FindAWSSDK.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "AWSSDK", but
CMake did not find one.
Could not find a package configuration file provided by "AWSSDK" with any
of the following names:
AWSSDKConfig.cmake
awssdk-config.cmake
Add the installation prefix of "AWSSDK" to CMAKE_PREFIX_PATH or set
"AWSSDK_DIR" to a directory containing one of the above files. If "AWSSDK"
provides a separate development package or SDK, be sure it has been
installed.
我认为缺少的是此处make install
描述的步骤并将路径设置为.AWSSDK_DIR
我对 CMake 很陌生,我还没有找到任何方法来执行make install
CMakeLists.txt 文件中的步骤,然后能够设置指向AWSSDKConfig.cmake
orawssdk-config.cmake
文件丢失的 AWSSDK_DIR。
我也不确定应该写哪个 CMakeLists.txt 文件,或者是否有其他方法可以做到这一点?目前我被困在无处可去..