Meson fails when searching for Threads dependency using cmake: dependency('Threads', method: 'cmake', modules: ['Threads::Threads']) This issue was likely caused by an update to how Meson manages CMake dependencies: https://github.com/mesonbuild/meson/pull/8812 See also issue in meson: https://github.com/mesonbuild/meson/issues/10384 The issue only occurs with meson >= 59.0 I studied this issue a bit and found a couple workarounds for this in Yocto: First one is to modify cmake_toolchain_file in SDK's meson.cross from cmake_toolchain_file='<sdkpath>/usr/share/cmake/OEToolchainConfig.cmake' to cmake_toolchain_file='<sdkpath>/usr/share/cmake/cortexa53-crypto-<distro>-toolchain.cmake' Another one is to modify OEToolchainConfig.cmake from file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" ) to file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_DIR}/*toolchain.cmake" ) To me it looks like the SDK's configuration is a bit off and meson therefore fails to get the correct information from the environment. I'm wondering if this behavior is a bug or if I'm doing something wrong here.
Looking at this a bit more and I can see that the cmake_toolchain_file option comes from our own layer so I think this is not actually an oe-core issue. It seems that OE-core does not have support for this cmake-meson interoperability out-of-the-box.
Seems to be specific to Toni's local layer.