[oe] [PATCH] render cmake search path stricter

Douglas Royds douglas.royds at tait.co.nz
Wed Jun 24 05:31:21 UTC 2009


Any particular reason not to include CMAKE_FIND_ROOT_PATH_MODE_PACKAGE?

Normally this won't have any effect, as CMake will look in the CMake 
installation for FindSomething.cmake ("module" mode). But if a package 
installs a SomethingConfig.cmake in /usr/share/cmake (the "config" mode 
of find_package) we should be looking only in staging, not trawling 
around on the host PC.

Douglas.


Valentin Longchamp wrote:
> The search is only done in the STAGING directy: all the needed tools
> should be there (already built) and all the libs and header are there
> too. With this, we are sure that we do not mix with the host libs,
> headers or tools.
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp at epfl.ch>
> ---
>  classes/cmake.bbclass |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
> index b5b7b86..af8f3a9 100644
> --- a/classes/cmake.bbclass
> +++ b/classes/cmake.bbclass
> @@ -21,6 +21,9 @@ cmake_do_configure() {
>    cmake ${OECMAKE_SOURCEPATH} \
>      -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
>      -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
> +    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY \
> +    -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
> +    -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
>      ${EXTRA_OECMAKE} \
>      -Wno-dev
>  }
>   


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
 altered or corrupted during transmission.
=======================================================================





More information about the Openembedded-devel mailing list