find_library NO_DEFAULT_PATH not working as expected
When using find_library to locate locally owned libraries (not on the toolchain) NO_DEFAULT_PATH is used as followed:
find_library(name_of_lib NAMES libname_of_lib name_of_lib.a PATHS path/to/dir/containing/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
The resulting error is:
/home/user/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/bin/ld: cannot find -lname_of_lib
This was tried with and without NO_CMAKE_FIND_ROOT_PATH with no change to the error. My understanding is that using NO_DEFAULT_PATH should result in the specified 'PATHS' and 'HINTS' to be used in lieu of a default path and instead it seems to ignore these entirely.