I am trying to cross compile a C++ application for ARM64 using CMake. I have a working cross compiler and can compile hello world for ARM64 easily.
However, this particular application has a lot of dependencies, like libxml2.
Now, I can see this library has already been built for arm64 in the debian repos (https://packages.debian.org/buster/arm64/libxml2/download).
However, there doesn't seem to be an easy way to download it and its dependencies to a sysroot I could point the cross compiler to. It seems like I would have to manually download, extract, and place it in my sysroot.
Is there a way I can tell apt or apt-get to download and install the arm64 version of a package to a specific sysroot instead of installing it to my main directory?
How do other people accomplish this basic task?