[CMake] find_library while cross compiling?

Ben Pope benpope81 at gmail.com
Sun May 3 21:58:22 EDT 2015


On Friday, May 01, 2015 04:34 AM, Robert Dailey wrote:
> I'm on Windows and I am cross compiling for Android NDK. I use
> find_library() with PATHS to hunt down some libssl.a files, plus a few
> others.
>
> However, find_library() says it can't find them. I'm assuming this is
> because I'm on Windows and it doesn't recognize *.a files as a valid
> library on that platform. Is there a way to make CMake search
> libraries based on the platform the target is being compiled for?

I haven' tried developing in the above scenario, but you'll also want to 
check out CMAKE_FIND_ROOT_PATH and friends when cross-compiling.

Ben




More information about the CMake mailing list