taka-no-me / android-cmake

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

*find_path* and *find_library* doesn't seem to work #95

Closed septag closed 7 years ago

septag commented 7 years ago

I'm trying to use _findpath and _findlibrary to find headers and libraries for local files that I built for android. The path is correct but it doesn't find anything. Here's an example:

set(LIBUV_ROOT_DIR "[Path to libuv local files]")
find_path(LIBUV_INCLUDE_DIR
     NAMES uv.h
     HINTS ${LIBUV_ROOT_DIR}/include
)

LIBUV_INCLUDE_DIR-Not-Found

do these functions work for android-toolchain ?

septag commented 7 years ago

Thanks, that solved the problem

ikcalB commented 5 years ago

ran into the same issue/solution.

Why is this even necessary!? According to docs, cmake should continue to search in HINTS/PATHS. It does not seem to do that, without specifying NO_CMAKE_ROOT_PATH. Bug?