1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-09 03:20:01 +00:00
This commit is contained in:
Carles Fernandez 2019-06-21 02:51:03 +02:00
commit 7f85596396
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 4 additions and 11 deletions

View File

@ -48,18 +48,17 @@ find_path(GROSMOSDR_INCLUDE_DIR
osmosdr/source.h osmosdr/source.h
osmosdr/api.h osmosdr/api.h
PATHS PATHS
${GROSMOSDR_PKG_INCLUDE_DIRS}
/usr/include /usr/include
/usr/local/include /usr/local/include
/opt/local/include /opt/local/include
${GROSMOSDR_ROOT}/include ${GROSMOSDR_ROOT}/include
$ENV{GROSMOSDR_ROOT}/include $ENV{GROSMOSDR_ROOT}/include
${GROSMOSDR_PKG_INCLUDEDIR}
) )
find_library(GROSMOSDR_LIBRARIES find_library(GROSMOSDR_LIBRARIES
NAMES gnuradio-osmosdr NAMES gnuradio-osmosdr
PATHS PATHS
${GROSMOSDR_PKG_LIBRARY_DIRS}
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
/opt/local/lib /opt/local/lib
@ -91,6 +90,7 @@ find_library(GROSMOSDR_LIBRARIES
$ENV{GROSMOSDR_ROOT}/lib $ENV{GROSMOSDR_ROOT}/lib
${GROSMOSDR_ROOT}/lib64 ${GROSMOSDR_ROOT}/lib64
$ENV{GROSMOSDR_ROOT}/lib64 $ENV{GROSMOSDR_ROOT}/lib64
${GROSMOSDR_PKG_LIBDIR}
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)

View File

@ -111,13 +111,11 @@ endif()
#Functions #Functions
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckVariableExists)
set(OLD_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) set(OLD_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS}) set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES})
check_variable_exists("pcap_version" HAVE_PCAP_VERSION)
check_function_exists("pcap_breakloop" HAVE_PCAP_BREAKLOOP) check_function_exists("pcap_breakloop" HAVE_PCAP_BREAKLOOP)
check_function_exists("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL) check_function_exists("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
check_function_exists("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME) check_function_exists("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
@ -134,13 +132,8 @@ set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES) find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)
if(${HAVE_PCAP_VERSION}) if(PCAP_FOUND AND PC_PCAP_VERSION)
set(PCAP_VERSION ${HAVE_PCAP_VERSION})
endif()
if(NOT PCAP_VERSION)
if(PC_PCAP_VERSION)
set(PCAP_VERSION ${PC_PCAP_VERSION}) set(PCAP_VERSION ${PC_PCAP_VERSION})
endif()
endif() endif()
if(PCAP_FOUND AND NOT TARGET Pcap::pcap) if(PCAP_FOUND AND NOT TARGET Pcap::pcap)