Try to make cross-compiling environment with library directory linked to target platform.
Recently I try to make cross-compiling environment with library directory linked to target platform. In the end, not all library is recognized by CMake, however, it is a light-weight approach to build a application with cross-compiling.
https://bladesu.github.io/learning/devops/cross_compilation/dockerized/0001_cmake_sshfs_opencv/