From: Ross Burton Date: Thu, 11 Jun 2015 13:33:56 +0000 (+0100) Subject: cmake: extend CMAKE_MODULE_PATH instead of setting X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~30084 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cfa8427d77f680df37c12d00125501ebe7c38a3;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cmake: extend CMAKE_MODULE_PATH instead of setting Some (e.g. piglit) CMakeList.txt files will extend CMAKE_MODULE_PATH before calling project(), which is when the toolchain.cmake file is parsed. In this situation the CMAKE_MODULE_PATH is overwritten, so handle this by appending in toolchain.cmake instead of assigning. Signed-off-by: Ross Burton --- diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index 1ebb9364d4d..b0a3972d475 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass @@ -62,7 +62,7 @@ set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf ) set( CMAKE_INSTALL_RPATH ${OECMAKE_RPATH} ) # Use native cmake modules -set( CMAKE_MODULE_PATH ${STAGING_DATADIR}/cmake/Modules/ ) +list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/") # add for non /usr/lib libdir, e.g. /usr/lib64 set( CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})