[CMake] [cmake-developers] Debugging find_package() search behavior?

Brad King brad.king at kitware.com
Tue Aug 29 11:54:53 EDT 2017


On 08/29/2017 11:50 AM, Robert Dailey wrote:
> Wow even if I set ZLIB_ROOT, FindZLIB.cmake *still* won't find my zlib
> over the one provided by the Android NDK...
> 
> Although I was able to get this working fine on Windows, it does not
> work with the NDK's toolchain file.

That's because the CMAKE_FIND_ROOT_PATH settings re-root all search
paths to look only inside the NDK.  This is one reason toolchain files
should not be monolithic and should only be authored locally for the
current machine.

-Brad


More information about the CMake mailing list