title: Yocto SDK with cmake toolchain file
body: <p>I provide a Yocto SDK to cross-build an application for an embedded target. The application itself is built using CMake. The SDK setup script provides many necessary environment variables (like location of the cross-compiler, sysroot, etc.), which so far was enough to build the application.</p>
  
  <p>However, since recently the application has a dependency to the Boost library (through the command <code>find_package(Boost REQUIRED)</code> in the CMakeLists.txt). Now CMake complains that it cannot find the library, even though it's installed in the SDK sysroot. But if I build the application directly in Yocto, it works fine.</p>
  
  <p>After some research it turned out that Yocto generates a <code>toolchain.cmake</code> file which is added to the cmake call. In this file, the variable <code>CMAKE_FIND_ROOT_PATH</code> is set, which CMake needs to find libraries. Using such a toolchain file, I can also build using the SDK.</p>
  
  <p>Now I'm wondering if Yocto provides any mechanism to export such a toolchain file with the SDK. Or alternatively if the SDK provides a script or something to automatically create a toolchain file directly on the SDK build host.</p>
  
  <p>Or shall I just tell the users of the SDK to manually create a toolchain file and add it to their cmake call?</p>