taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 437 forks source link

Handle effectively the Android NDK equivalent of Debian's multiarch in library searching #45

Open rpavlik opened 9 years ago

rpavlik commented 9 years ago

Don't know how to specify default path suffixes, so this won't help with directories added to CMAKE_PREFIX_PATH later, but it's useful.

(Specifically, needed for CrystaX boost libs to be found, but useful in general, especially if the user has other libs installed to the CMAKE_INSTALL_PREFIX.)

taka-no-me commented 9 years ago

I'm agree with the idea of this change but not quite sure that modifying CMAKE_SYSTEM_LIBRARY_PATH is a right thing. Let me ponder for some time before deciding if it is Ok to handle it this way.

abergmeier commented 9 years ago

@taka-no-me What are the reasons against this?

rpavlik commented 9 years ago

My impression from reading cmake docs is that is the place to put the path, since things that happen in the tool chain file are effectively "system", and thus the non system variables should be left under control of the build and user. Extending this particular variable allows find library to work without explicit additions per platform.