Начало проекта
This commit is contained in:
32
MyxCMake/find/FindVeerProtocols.cmake
Normal file
32
MyxCMake/find/FindVeerProtocols.cmake
Normal file
@@ -0,0 +1,32 @@
|
||||
if(NOT VEER_PROTOCOLS_IS_EXTERNAL_PROJECT)
|
||||
set(VEER_PROTOCOLS_PREFIX "" CACHE PATH "The path to the prefix of veer protocols installation")
|
||||
set(VEER_PROTOCOLS_INCLUDE_DIR "" CACHE PATH "The path to the headers of veer protocols installation")
|
||||
|
||||
set(_search_paths "")
|
||||
if(EXISTS VEER_PROTOCOLS_INCLUDE_DIR)
|
||||
list(APPEND _search_paths ${VEER_PROTOCOLS_INCLUDE_DIR})
|
||||
endif()
|
||||
if(EXISTS VEER_PROTOCOLS_PREFIX)
|
||||
list(APPEND _search_paths ${VEER_PROTOCOLS_PREFIX}/include)
|
||||
endif()
|
||||
find_path(
|
||||
VEER_PROTOCOLS_INCLUDE_DIRS
|
||||
NAMES veer/common/ports.hpp
|
||||
PATHS ${_search_paths})
|
||||
unset(_search_paths)
|
||||
|
||||
if(VEER_PROTOCOLS_INCLUDE_DIRS)
|
||||
set(VEER_PROTOCOLS_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(VEER_PROTOCOLS_FOUND)
|
||||
if(NOT VEER_PROTOCOLS_FIND_QUIETLY)
|
||||
message(STATUS "Found veer protocols")
|
||||
endif()
|
||||
set(HAVE_VEER_PROTOCOLS 1)
|
||||
elseif(VEER_PROTOCOLS_FOUND)
|
||||
if(VEER_PROTOCOLS_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find veer protocols")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
Reference in New Issue
Block a user