我正在使用buildroot,并且正在尝试交叉编译位于以下位置的AWS IOT cmake库:https://github.com/aws/aws-iot-device-sdk-cpp
我在这里有另一个用于不同AWS sdk的构建根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.
...Makefile:
################################################################################
# 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编译这个库?谢谢。
发布于 2017-02-10 21:56:57
在*.mk中添加以下行可以避免此问题:AWS_IOT_DEVICE_SDK_CPP_SUPPORTS_IN_SOURCE_BUILD = NO
有关更多详细信息,请参阅http://nightly.buildroot.org/#cmake-package-reference
https://stackoverflow.com/questions/42148288
复制相似问题