]> code.ossystems Code Review - openembedded-core.git/commit
cmake: Avoid passing empty prefix to os.path.relpath
authorMike Crowe <mac@mcrowe.com>
Sun, 12 Nov 2017 16:39:23 +0000 (16:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Jun 2019 09:53:53 +0000 (10:53 +0100)
commit67b19414c1c17f71f39c971b9f9fdd1f776516a1
treee0eb0ac7e135e8c48b0ad2a6c33f49376477aeb1
parente6ca80559f02a8a38272ae52c568053dde52ac9f
cmake: Avoid passing empty prefix to os.path.relpath

With meta-micro, ${prefix} is the empty string. This means that
CMAKE_INSTALL_BINDIR:PATH and friends end up containing paths starting with
many instances of "../", presumably due to os.path.relpath attempting to
find its way to the current directory.

Let's avoid this by ensuring that the root path always ends in a slash. If
it already ends in a slash then adding another one shouldn't cause any
problems.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cmake.bbclass