The SDK cmake is currently broken as the cmake.sh (sourced via environment- setup script) sets cmake alias which looks for cmake toolchain file $OECORE_NATIVE_SYSROOT/usr/share/OEToolchainConfig.cmake which cannot be found as the file is packaged into nativesdk-cmake-dev package that is not installed as part of SDK by default.
The solution here is to move OEToolchainConfig.cmake to a different path which doesn't get packaged up in -dev package, in this case the same directory as cmake.sh which depends on it. Both qemux86 and qemuarm64 core-image-sato SDK's cmake has been tested to work with this fix to make sure that OEToolchainConfig.cmake does not have target architecture specific cmake toolchain settings. [YOCTO #12827] Signed-off-by: Chin Huat Ang <[email protected]> --- meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh | 2 +- meta/recipes-devtools/cmake/cmake_3.11.4.bb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh index 0eb56b6..be7f2b6 100644 --- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh +++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh @@ -1 +1 @@ -alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" +alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/environment-setup.d/OEToolchainConfig.cmake" diff --git a/meta/recipes-devtools/cmake/cmake_3.11.4.bb b/meta/recipes-devtools/cmake/cmake_3.11.4.bb index 3f8fd7a..7ef5740 100644 --- a/meta/recipes-devtools/cmake/cmake_3.11.4.bb +++ b/meta/recipes-devtools/cmake/cmake_3.11.4.bb @@ -35,10 +35,8 @@ EXTRA_OECMAKE=" \ " do_install_append_class-nativesdk() { - mkdir -p ${D}${datadir}/cmake - install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${SDKPATHNATIVE}/environment-setup.d/OEToolchainConfig.cmake install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh } -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
