I am using CMake with a custom toolchain that I built using yocto. I have a problem though, the toolchain has sysroot for the target machine and one for the build machine.
CMake keeps finding the libraries in the build system sysroot only.
For example I am using:
find_package(libxml2)
But it always keeps finding libxml2 in the build system sysroot instead of the target sysroot. How can I tell it to only look in the target sysroot?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…