mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-20 01:44:27 +02:00

For some reason, the default setting in all Toolchain.cmake is: ``` set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) ``` For cross-compilation, CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER makes sense (we only want to find executables in host system root), but CMAKE_FIND_ROOT_PATH_MODE_LIBRARY/INCLUDE should be set to ONLY, otherwise cmake may find libraries in host system root, and try to link with incompatible libraries (instead of cross-compilation sysroot). Fixes #431.