Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

cmake: populate `CMAKE_FIND_ROOT_PATH` when cross-compiling for a different architecture on Linux

Open illwieckz opened this issue 10 months ago • 4 comments

Populate CMAKE_FIND_ROOT_PATH when cross-compiling on Linux.

Fix:

  • https://github.com/DaemonEngine/Daemon/issues/1659

illwieckz avatar May 02 '25 00:05 illwieckz

I modified a bit the comments to make them more understandable.

illwieckz avatar Jun 12 '25 12:06 illwieckz

Why is it inside if (DEPS_DIR) ?

slipher avatar Jun 12 '25 13:06 slipher

Right, it's not needed to be there, I moved it out of that block.

illwieckz avatar Jun 12 '25 14:06 illwieckz

It would be better to avoid setting CMAKE_FIND_ROOT_PATH if possible, since it causes CMAKE_PREFIX_PATH not to work as I discovered on #1433. When both of those variables are set, CMake concatenates the root path and prefix path together, instead of using the prefix path as is (unless the prefix path is already a subdirectory of the root path).

slipher avatar Aug 18 '25 14:08 slipher