Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] reason for using "BOTH" as default for CMAKE_FIND_ROOT_PATH_MODE_*? #134

Open
Znerole opened this issue Feb 7, 2022 · 1 comment

Comments

@Znerole
Copy link

Znerole commented Feb 7, 2022

Hey! I'm just curious, why the defaults for the different CMAKE_FIND_ROOT_PATH_MODE_* switches had been changed to BOTH in this (old) change: 96e13cf

Last week I was quite confused, because my iOS cross compilation pulled in a MacOS library installed via brew on my host machine. In comparison, the Android toolchain sets everything to ONLY per default, which makes more sense to me.

I guess BOTH was chosen to better support MacOS and/or Catalyst as a target platform? Could the default value depend on what kind of target we are building for?

Anyway, I'm explicitly setting these values now in my build, which fixes my problem as expected, but I'm still scratching my head over why I would want to use BOTH in the first place when cross compiling. Is it a thing to install iOS libraries globally on the host? (Disclaimer: I'm not a Mac user).

@leetal
Copy link
Owner

leetal commented Apr 4, 2022

Yes, using BOTH was indeed a fix to better handle dependencies for macOS, but also since older versions of CMake did have some issues with finding dependencies for simulators etc. Will look into updating or changing the current behaviour since versions older than CMake 3.12 is ancient by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants