mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
In the same spirit as the REQUIRED keyword on find_package, this will stop cmake execution with an error on a failed find_program, find_file, find_path or find_library.
15 lines
317 B
CMake
15 lines
317 B
CMake
list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib)
|
|
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
|
find_library(LIB_exists
|
|
NAMES PrefixInPATH
|
|
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
|
|
NO_DEFAULT_PATH
|
|
REQUIRED
|
|
)
|
|
message(STATUS "LIB_exists='${LIB_exists}'")
|
|
|
|
find_library(LIB_doNotExists
|
|
NAMES doNotExists
|
|
REQUIRED
|
|
)
|