You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
422 B

list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(ENV_PATH "$ENV{PATH}")
foreach(path "/does_not_exist" "" "/bin" "/sbin")
unset(PrefixInPATH_LIBRARY CACHE)
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
find_library(PrefixInPATH_LIBRARY NAMES PrefixInPATH)
message(STATUS "PrefixInPATH_LIBRARY='${PrefixInPATH_LIBRARY}'")
endforeach()
set(ENV{PATH} "${ENV_PATH}")