[PATCH v2 3/7] cmake: clean up variables shared between .bb and .inc

Ross Burton
2026-02-16T13:48:52Z

Use EXTRA_OECMAKE in the non-cmake-inheriting cmake-native recipe, so
that the cmake.inc can assign once.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/recipes-devtools/cmake/cmake-native_4.2.3.bb | 4 ++--
meta/recipes-devtools/cmake/cmake_4.2.3.bb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb b/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
index 128fef8a6e7..299cb4d1ea6 100644
--- a/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
@@ -22,7 +22,7 @@ LIC_FILES_CHKSUM:append = " \
B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}"

-CMAKE_EXTRACONF = "\
+EXTRA_OECMAKE += "\
-DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
-DBUILD_CursesDialog=1 \
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
@@ -41,7 +41,7 @@ do_configure () {
${S}/bootstrap --verbose --prefix=${prefix} \
${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
- -- ${CMAKE_EXTRACONF}
+ -- ${EXTRA_OECMAKE}
}

do_compile() {
diff --git a/meta/recipes-devtools/cmake/cmake_4.2.3.bb b/meta/recipes-devtools/cmake/cmake_4.2.3.bb
index 7c3dda2b157..233ceeae153 100644
--- a/meta/recipes-devtools/cmake/cmake_4.2.3.bb
+++ b/meta/recipes-devtools/cmake/cmake_4.2.3.bb
@@ -33,7 +33,7 @@ python () {
d.setVar("docdir_stripped", docdir_stripped)
}

-EXTRA_OECMAKE = " \
+EXTRA_OECMAKE += " \
-DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
--
2.43.0