myx-qping
This commit is contained in:
parent
e1cd5f7e4b
commit
79a7714dc1
45
FindMyxQPing.cmake
Normal file
45
FindMyxQPing.cmake
Normal file
@ -0,0 +1,45 @@
|
||||
if(NOT MYX_QPING_IS_EXTERNAL_PROJECT)
|
||||
set(MYX_QPING_PREFIX "" CACHE PATH "The path to the prefix of an myx-qping installation")
|
||||
set(MYX_QPING_INCLUDE_DIR "" CACHE PATH "The path to the headers of an myx-qping installation")
|
||||
set(MYX_QPING_LIBRARY_DIR "" CACHE PATH "The path to the library of an myx-qping installation")
|
||||
|
||||
set(_search_paths "")
|
||||
if(MYX_QPING_INCLUDE_DIR AND EXISTS ${MYX_QPING_INCLUDE_DIR})
|
||||
list(APPEND _search_paths ${MYX_QPING_INCLUDE_DIR})
|
||||
endif()
|
||||
if(MYX_QPING_PREFIX AND EXISTS ${MYX_QPING_PREFIX})
|
||||
list(APPEND _search_paths "${MYX_QPING_PREFIX}/include")
|
||||
endif()
|
||||
find_path(
|
||||
MYX_QPING_INCLUDE_DIRS
|
||||
NAMES myx/qping/ping.hpp
|
||||
PATHS ${_search_paths})
|
||||
|
||||
set(_search_paths "")
|
||||
if(MYX_QPING_LIBRARY_DIR AND EXISTS ${MYX_QPING_LIBRARY_DIR})
|
||||
list(APPEND _search_paths ${MYX_QPING_LIBRARY_DIR})
|
||||
endif()
|
||||
if(MYX_QPING_PREFIX AND EXISTS ${MYX_QPING_PREFIX})
|
||||
list(APPEND _search_paths "${MYX_QPING_PREFIX}/lib")
|
||||
endif()
|
||||
find_library(
|
||||
MYX_QPING_LIBRARIES
|
||||
NAMES preprocmath
|
||||
PATHS ${_search_paths})
|
||||
unset(_search_paths)
|
||||
|
||||
if(MYX_QPING_INCLUDE_DIRS AND MYX_QPING_LIBRARIES)
|
||||
set(MYX_QPING_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(MYX_QPING_FOUND)
|
||||
if(NOT MYX_QPING_FIND_QUIETLY)
|
||||
message(STATUS "Found myx-qping")
|
||||
endif()
|
||||
set(HAVE_MYX_QPING 1)
|
||||
elseif(MYX_QPING_FOUND)
|
||||
if(MYX_QPING_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find myx-qping")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user