[Buildroot] CMake package requires out of source build

mattwood2000 at gmail.com mattwood2000 at gmail.com
Wed Feb 17 16:59:36 UTC 2021


Hi Alex,

On Wed, Feb 17, 2021 at 10:52 AM Alexander Dahl <post at lespocky.de> wrote:
> Just out of curiousity: why would you want to build in source anyways?
> Why not build out of source as usually recommended and first class
> supported by CMake?

I would prefer to build the source like a normal cmake package,
however Amazon disallows building their SDK anywhere within the
original source directory.  Normally, there should not be any issue
with:

./cmake_pkg_src
./cmake_pkg_src/buildroot-build // PKG_SUPPORTS_IN_SOURCE_BUILD = NO

But in this case there is a cmake rule that iterates over the entire
source directory to check if the build directory is present:
https://github.com/alexa/avs-device-sdk/blob/master/build/cmake/DisallowOutOfSourceBuilds.cmake

Removing the rule from BuildDefaults.cmake gets around this issue.
Also, the source builds perfectly fine this way.  I'm not sure why
Amazon forces this.

Thanks, Matt.
>
> Greets
> Alex
>
> --
> /"\ ASCII RIBBON | »With the first link, the chain is forged. The first
> \ / CAMPAIGN     | speech censured, the first thought forbidden, the
>  X  AGAINST      | first freedom denied, chains us all irrevocably.«
> / \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)



More information about the buildroot mailing list