All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable for CMake Toolchain
@ 2016-12-26 13:41 Andreas Cord-Landwehr
  2017-01-07 10:49 ` Andreas Cord-Landwehr
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Cord-Landwehr @ 2016-12-26 13:41 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

Hey, I would like to propose the appended patch for Poky's CMake toolchain to 
allow its usage inside a Yocto SDK for building libraries and applications 
using an external (meaning as in "different to the native SDK dir") install 
directory.

I hope that I use the correct mailing list and patch format. (It's my first 
patch to Yocto) Please tell me if this mail is better suited for a different 
mailing list.

Cheers,
Andreas

[-- Attachment #2: 0001-Provide-additional-OECORE_EXTRA_SYSROOT-variable.patch --]
[-- Type: text/x-patch, Size: 2097 bytes --]

From b09bc09c13d1ec9334bdc8a2c148436f1f363b71 Mon Sep 17 00:00:00 2001
From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
Date: Mon, 26 Dec 2016 13:43:02 +0100
Subject: [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable

When compiling against a Yocto generated SDK and using an install folder
outside of the SDK's folder, CMake must be configure by using the
respective CMAKE_FIND_ROOT_PATH. This CMake cache variable is set
in the toolchain file and hence can only be configured via environment
variables; unless one wants to modify a project's CMake files.

This patch adds an additional environment variable OECORE_EXTRA_SYSROOT
to specify such an additional sysroot location that can optionally
be used when building against a Yocto SDK using this toolchain file.

Signed-off-by: Andreas Cord-Landwehr <cordlandwehr@kde.org>
---
 meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 6518408c70..1927e0bdb4 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -4,7 +4,10 @@ set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE )
 set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
 set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
 
-set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
+# Re-root CMake search tree to sysroot locations given by environment variables OECORE_TARGET_SYSROOT and
+# OECORE_NATIVE_SYSROOT. For additional locations, e.g. a cross-building install directory, use
+# the OECORE_EXTRA_SYSROOT variable.
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} $ENV{OECORE_EXTRA_SYSROOT} )
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable for CMake Toolchain
  2016-12-26 13:41 [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable for CMake Toolchain Andreas Cord-Landwehr
@ 2017-01-07 10:49 ` Andreas Cord-Landwehr
  2017-01-09 10:33   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Cord-Landwehr @ 2017-01-07 10:49 UTC (permalink / raw)
  To: yocto

Hi, since it's roughly two weeks, I just wanted to bump this patch again (yes, 
I know many people were on vacations).
But actually, I would already be glad to hear whether I sent the patch to the 
right list.

Cheers,
Andreas

On Monday, December 26, 2016 2:41:49 PM CET Andreas Cord-Landwehr wrote:
> Hey, I would like to propose the appended patch for Poky's CMake toolchain
> to allow its usage inside a Yocto SDK for building libraries and
> applications using an external (meaning as in "different to the native SDK
> dir") install directory.
> 
> I hope that I use the correct mailing list and patch format. (It's my first
> patch to Yocto) Please tell me if this mail is better suited for a different
> mailing list.
> 
> Cheers,
> Andreas




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable for CMake Toolchain
  2017-01-07 10:49 ` Andreas Cord-Landwehr
@ 2017-01-09 10:33   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2017-01-09 10:33 UTC (permalink / raw)
  To: Andreas Cord-Landwehr; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On 7 January 2017 at 10:49, Andreas Cord-Landwehr <cordlandwehr@kde.org>
wrote:

> Hi, since it's roughly two weeks, I just wanted to bump this patch again
> (yes,
> I know many people were on vacations).
> But actually, I would already be glad to hear whether I sent the patch to
> the
> right list.
>

The correct list would be openembedded-core@lists.openembedded.org, and if
possible please send the patch with git-send-email (or similar) for easier
reviewing.

Ross

[-- Attachment #2: Type: text/html, Size: 956 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-09 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26 13:41 [PATCH] Provide additional OECORE_EXTRA_SYSROOT variable for CMake Toolchain Andreas Cord-Landwehr
2017-01-07 10:49 ` Andreas Cord-Landwehr
2017-01-09 10:33   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.