cmake-find/FindPvdProtocol.cmake
2021-09-22 14:24:51 +03:00

33 lines
990 B
CMake

if(NOT PVD_PROTOCOL_IS_EXTERNAL_PROJECT)
set(PVD_PROTOCOL_PREFIX "" CACHE PATH "The path to the prefix of an PVD protocols installation")
set(PVD_PROTOCOL_INCLUDE_DIR "" CACHE PATH "The path to the headers of an PVD protocols installation")
set(_search_paths "")
if(EXISTS PVD_PROTOCOL_INCLUDE_DIR)
list(APPEND _search_paths ${PVD_PROTOCOL_INCLUDE_DIR})
endif()
if(EXISTS PVD_PROTOCOL_PREFIX)
list(APPEND _search_paths "${PVD_PROTOCOL_PREFIX}/include")
endif()
find_path(
PVD_PROTOCOL_INCLUDE_DIRS
NAMES pvd/zg108g6/fsp/header.hpp
PATHS ${_search_paths})
unset(_search_paths)
if(PVD_PROTOCOL_INCLUDE_DIRS)
set(PVD_PROTOCOL_FOUND TRUE)
endif()
if(PVD_PROTOCOL_FOUND)
if(NOT PVD_PROTOCOL_FIND_QUIETLY)
message(STATUS "Found PVD protocol")
endif()
set(HAVE_PVD_PROTOCOL 1)
elseif(PVD_PROTOCOL_FOUND)
if(PVD_PROTOCOL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find PVD protocol")
endif()
endif()
endif()