用于 aws-iot-device-sdk-cpp 的 Buildroot MakeFile

Buildroot MakeFile for aws-iot-device-sdk-cpp

我正在使用 buildroot,我正在尝试交叉编译此处找到的 AWS IOT cmake 库: https://github.com/aws/aws-iot-device-sdk-cpp

我有另一个 buildroot 生成文件(正确编译)来自这里的不同 AWS sdk: https://github.com/aws/aws-sdk-cpp

我复制了另一个 makefile 并试图修改它来构建,但我收到以下错误:

...
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:9 (message):
  In-source builds not allowed.  Please make a new directory (called a build
  directory) and run CMake from there.  You may need to remove CMakeCache.txt
  and CMakeFiles folder.
...

生成文件:

################################################################################
# aws-iot-device-sdk-cpp
################################################################################
AWS_IOT_DEVICE_SDK_CPP_VERSION = master
AWS_IOT_DEVICE_SDK_CPP_SITE = https://github.com/aws/aws-iot-device-sdk-cpp.git
AWS_IOT_DEVICE_SDK_CPP_SITE_METHOD = git
AWS_IOT_DEVICE_SDK_CPP_INSTALL_STAGING = YES
AWS_IOT_DEVICE_SDK_CPP_INSTALL_TARGET = YES
AWS_IOT_DEVICE_SDK_CPP_CONF_OPT = -DBUILD_ONLY="aws-iot-sdk-cpp"
AWS_IOT_DEVICE_SDK_CPP_DEPENDENCIES = host-cmake libcurl openssl util-linux
AWS_IOT_DEVICE_SDK_CPP_LICENSE = GPLv2
AWS_IOT_DEVICE_SDK_CPP_LICENSE_FILES = LICENSE

AWS_IOT_DEVICE_SDK_CPP_PRE_CONFIGURE_HOOKS += AWS_IOT_DEVICE_SDK_CPP_CMAKE_MOVE_HOOK

define AWS_IOT_DEVICE_SDK_CPP_CMAKE_MOVE_HOOK
    mkdir $(@D)/build
endef

$(eval $(cmake-package))

如何让 Buildroot 编译这个库?谢谢

在 *.mk 中添加以下行应该可以避免这个问题: AWS_IOT_DEVICE_SDK_CPP_SUPPORTS_IN_SOURCE_BUILD = NO

详情请参考http://nightly.buildroot.org/#cmake-package-reference