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.

18 lines
482 B

find_package(Bar QUIET CONFIG NO_CMAKE_INSTALL_PREFIX)
if(Bar_FOUND)
message(SEND_ERROR "Bar should not be found, was found in ${Bar_DIR}")
endif()
set(CMAKE_FIND_USE_INSTALL_PREFIX OFF)
find_package(Bar QUIET CONFIG)
if(Bar_FOUND)
message(SEND_ERROR "Bar should not be found, was found in ${Bar_DIR}")
endif()
set(CMAKE_FIND_USE_INSTALL_PREFIX ON)
find_package(Bar QUIET CONFIG)
if(NOT Bar_FOUND)
message(SEND_ERROR "Bar should be found via CMAKE_INSTALL_PREFIX")
endif()