Skip to content

We may need to guess CMAKE_FIND_ROOT when cross-compiling #1659

Open
@illwieckz

Description

@illwieckz

When corss-compiling, CMake lines like this don't work:

find_library(LIBRT rt)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions