When cross-compiling, CMake lines like this don't work:
We need an explicit CMake option like -DCMAKE_FIND_ROOT_PATH=/usr/aarch64-linux-gnu.
For some reasons on some distributions or architectures it is not required to explicitly pass -lrt but on some, it is required to do it explicitly.
We may guess that root path in some ways, when it is not set. For example using <compiler> -dumpmachine.
When cross-compiling, CMake lines like this don't work:
We need an explicit CMake option like
-DCMAKE_FIND_ROOT_PATH=/usr/aarch64-linux-gnu.For some reasons on some distributions or architectures it is not required to explicitly pass
-lrtbut on some, it is required to do it explicitly.We may guess that root path in some ways, when it is not set. For example using
<compiler> -dumpmachine.