Skip to content

Conversation

@illwieckz
Copy link
Member

@illwieckz illwieckz commented May 2, 2025

Populate CMAKE_FIND_ROOT_PATH when cross-compiling on Linux.

Fix:

@illwieckz illwieckz force-pushed the illwieckz/cmake-root-path branch from 28a26b1 to c8674cf Compare May 2, 2025 00:42
@illwieckz illwieckz changed the title cmake: populate CMAKE_FIND_ROOT_PATH when cross-compiling on Linux cmake: populate CMAKE_FIND_ROOT_PATH when cross-compiling for a different architecture on Linux Jun 12, 2025
@illwieckz illwieckz force-pushed the illwieckz/cmake-root-path branch from c8674cf to e5ca00f Compare June 12, 2025 12:51
@illwieckz
Copy link
Member Author

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

@slipher
Copy link
Member

slipher commented Jun 12, 2025

Why is it inside if (DEPS_DIR) ?

@illwieckz illwieckz force-pushed the illwieckz/cmake-root-path branch from e5ca00f to be87af0 Compare June 12, 2025 14:19
@illwieckz
Copy link
Member Author

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

@slipher
Copy link
Member

slipher commented Aug 18, 2025

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants