我正在使用buildroot,我正在尝试交叉编译此处找到的AWS IOT cmake库: https://github.com/aws/aws-iot-device-sdk-cpp
我从这里为另外的AWS sdk提供了另一个buildroot makefile(正确编译): 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编译这个库?感谢。
答案 0 :(得分:5)
在* .mk中添加以下行应避免此问题:
AWS_IOT_DEVICE_SDK_CPP_SUPPORTS_IN_SOURCE_BUILD = NO
有关详细信息,请参阅http://nightly.buildroot.org/#cmake-package-reference