[oe-commits] [openembedded-core] 06/32: cmake: also set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE

git at git.openembedded.org git at git.openembedded.org
Sat Oct 15 09:05:51 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2df2372a31b02eab933e4a7aa6d5f8ca48e02c04
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Oct 10 12:41:34 2016 +0100

    cmake: also set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
    
    The other CMAKE_FIND_ROOT_PATH_MODE_* variables were already set to ONLY, but
    PACKAGE was left out.  Fix this so that cmake doesn't look on the host for cmake
    modules when it should only be looking in the target sysroot.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 60014bb..0ce6573 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -3,10 +3,12 @@ set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
 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} )
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
 
 string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
 string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list