title: How to install dependencies for a project that is being cross-compiled on an x86 host for an arm target
body: <p>I'm trying to build a project (<a href="https://wpewebkit.org/" rel="noreferrer">https://wpewebkit.org/</a>) on Debian Buster for armv7 on a x86 host of the same OS.</p>
  
  <p>I am able to successfully install an arm C++ toolchain and I can successfully compile and run trivial applications.</p>
  
  <p>Where I'm stuck is many of the projects I want to compile require many dependencies that I normally install through the OS's package manager (ex <code>apt-get install libjpeg-dev</code>). When cross compiling, it looks like I can just download &amp; <code>make install</code> the sources I need. However, this project has hundreds of dependencies - it would take a long time to download and compile all of them. At the same time, the arm versions of these dependencies already exist in <code>apt</code> for arm.</p>
  
  <p>How can I, on the host system, install the armhf versions of these dependencies and make them available to my cross compiling toolchain? I've tried <code>dpkg add-architecture armhf</code> and then installing via <code>apt-get install libjpeg-dev:armhf</code> but cmake can't seem to find the installed dependencies.</p>