46 lines
1.5 KiB
CMake
46 lines
1.5 KiB
CMake
|
if(NOT SIGNALVIEW_IS_EXTERNAL_PROJECT)
|
||
|
set(SIGNALVIEW_PREFIX "" CACHE PATH "The path to the prefix of an libsignalview installation")
|
||
|
set(SIGNALVIEW_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libsignalview installation")
|
||
|
set(SIGNALVIEW_LIBRARY_DIR "" CACHE PATH "The path to the library of an libsignalview installation")
|
||
|
|
||
|
set(_search_paths "")
|
||
|
if(SIGNALVIEW_INCLUDE_DIR AND EXISTS ${SIGNALVIEW_INCLUDE_DIR})
|
||
|
list(APPEND _search_paths ${SIGNALVIEW_INCLUDE_DIR})
|
||
|
endif()
|
||
|
if(SIGNALVIEW_PREFIX AND EXISTS ${SIGNALVIEW_PREFIX})
|
||
|
list(APPEND _search_paths "${SIGNALVIEW_PREFIX}/include")
|
||
|
endif()
|
||
|
find_path(
|
||
|
SIGNALVIEW_INCLUDE_DIRS
|
||
|
NAMES signalview/wndSignalView.hpp
|
||
|
PATHS ${_search_paths})
|
||
|
|
||
|
set(_search_paths "")
|
||
|
if(SIGNALVIEW_LIBRARY_DIR AND EXISTS ${SIGNALVIEW_LIBRARY_DIR})
|
||
|
list(APPEND _search_paths ${SIGNALVIEW_LIBRARY_DIR})
|
||
|
endif()
|
||
|
if(SIGNALVIEW_PREFIX AND EXISTS ${SIGNALVIEW_PREFIX})
|
||
|
list(APPEND _search_paths "${SIGNALVIEW_PREFIX}/lib")
|
||
|
endif()
|
||
|
find_library(
|
||
|
SIGNALVIEW_LIBRARIES
|
||
|
NAMES signalview
|
||
|
PATHS ${_search_paths})
|
||
|
unset(_search_paths)
|
||
|
|
||
|
if(SIGNALVIEW_INCLUDE_DIRS AND SIGNALVIEW_LIBRARIES)
|
||
|
set(SIGNALVIEW_FOUND TRUE)
|
||
|
endif()
|
||
|
|
||
|
if(SIGNALVIEW_FOUND)
|
||
|
if(NOT SIGNALVIEW_FIND_QUIETLY)
|
||
|
message(STATUS "Found libsignalview")
|
||
|
endif()
|
||
|
set(HAVE_SIGNALVIEW 1)
|
||
|
elseif(SIGNALVIEW_FOUND)
|
||
|
if(SIGNALVIEW_FIND_REQUIRED)
|
||
|
message(FATAL_ERROR "Could not find libsignalview")
|
||
|
endif()
|
||
|
endif()
|
||
|
endif()
|