1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00
sdrangel/cmake/Modules/FindSerialDV.cmake

34 lines
1.1 KiB
CMake
Raw Normal View History

2016-05-07 16:07:51 -04:00
# Find serialDV
2020-04-30 08:19:19 -04:00
if (NOT LIBSERIALDV_FOUND)
find_path(LIBSERIALDV_INCLUDE_DIR
NAMES dvcontroller.h
HINTS ${SERIALDV_DIR}/include/serialdv
PATHS /usr/include/serialdv
/usr/local/include/serialdv
)
2016-05-07 16:07:51 -04:00
2020-04-30 08:19:19 -04:00
set(LIBSERIAL_NAMES ${LIBSERIAL_NAMES} serialdv libserialdv)
2016-05-07 16:07:51 -04:00
2020-04-30 08:19:19 -04:00
find_library(LIBSERIALDV_LIBRARY
NAMES serialdv
HINTS ${SERIALDV_DIR}/lib
PATHS /usr/lib
/usr/local/lib
)
2016-05-07 16:07:51 -04:00
2020-04-30 08:19:19 -04:00
if (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
set(LIBSERIALDV_FOUND TRUE CACHE INTERNAL "")
2016-05-07 16:07:51 -04:00
2020-04-30 08:19:19 -04:00
if (NOT SerialDV_FIND_QUIETLY)
message (STATUS "Found libserialdv: ${LIBSERIALDV_INCLUDE_DIR}, ${LIBSERIALDV_LIBRARY}")
endif (NOT SerialDV_FIND_QUIETLY)
else (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
set(LIBSERIALDV_FOUND FALSE CACHE INTERNAL "")
2020-04-30 08:19:19 -04:00
if (SerialDV_FIND_REQUIRED)
message (FATAL_ERROR "Could not find SerialDV")
endif (SerialDV_FIND_REQUIRED)
endif (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
2016-05-07 16:07:51 -04:00
2020-04-30 08:19:19 -04:00
mark_as_advanced(LIBSERIALDV_INCLUDE_DIR LIBSERIALDV_LIBRARY)
endif (NOT LIBSERIALDV_FOUND)