1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-08 17:46:03 -05:00
sdrangel/cmake/Modules/FindJRTPLib.cmake
2018-02-16 11:03:16 +01:00

40 lines
985 B
CMake

if(NOT JRTPLIB_FOUND)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_JRTPLIB "jrtplib")
FIND_PATH(JRTPLIB_INCLUDE_DIR
NAMES rtpsession.h
HINTS ${PC_JRTPLIB_INCLUDE_DIR}
${CMAKE_INSTALL_PREFIX}/include/jrtplib3
${JRTPLIB_INSTALL_PREFIX}/include/jrtplib3
PATHS
/usr/local/include/jrtplib3
/usr/include/jrtplib3
)
FIND_LIBRARY(JRTPLIB_LIBRARIES
NAMES libjrtp
HINTS ${PC_JRTPLIB_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
PATHS
${JRTPLIB_INCLUDE_DIR}/../lib
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
if(JRTPLIB_INCLUDE_DIR AND JRTPLIB_LIBRARIES)
set(JRTPLIB_FOUND TRUE CACHE INTERNAL "JRTPLib found")
message(STATUS "Found JRTPLib: ${JRTPLIB_INCLUDE_DIR}, ${JRTPLIB_LIBRARIES}")
else()
set(JRTPLIB_FOUND FALSE CACHE INTERNAL "JRTPLib found")
message(STATUS "JRTPLib not found")
endif()
MARK_AS_ADVANCED(JRTPLIB_LIBRARIES JRTPLIB_INCLUDE_DIR)
endif(NOT JRTPLIB_FOUND)