PhilBot
PhilBot

Reputation: 50

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

I'm using buildroot and I am trying to cross compile the AWS IOT cmake library found here: https://github.com/aws/aws-iot-device-sdk-cpp

I have another buildroot makefile ( the correctly compiles ) for the different AWS sdk from here: https://github.com/aws/aws-sdk-cpp

I copied that other makefile and tried to modify it to build but I get the following error:

...
-- 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))

How can I get Buildroot to compile this library? Thanks.

Upvotes: 1

Views: 917

Answers (1)

user7546246
user7546246

Reputation: 66

Adding the following line in the *.mk should avoid this issue: AWS_IOT_DEVICE_SDK_CPP_SUPPORTS_IN_SOURCE_BUILD = NO

For further details, refer to http://nightly.buildroot.org/#cmake-package-reference

Upvotes: 5

Related Questions