2018-05-13 20:49:11 +00:00
|
|
|
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
2013-10-14 16:51:47 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
|
|
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
2014-06-28 01:55:57 +00:00
|
|
|
# (at your option) any later version.
|
2013-10-14 16:51:47 +00:00
|
|
|
#
|
|
|
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2013-10-14 16:51:47 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-05-16 09:36:37 +00:00
|
|
|
if(ENABLE_RAW_UDP)
|
|
|
|
# - Try to find libpcap include dirs and libraries
|
|
|
|
#
|
|
|
|
# Usage of this module as follows:
|
|
|
|
#
|
|
|
|
# find_package(PCAP)
|
|
|
|
#
|
|
|
|
# Variables used by this module, they can change the default behaviour and need
|
|
|
|
# to be set before calling find_package:
|
|
|
|
#
|
|
|
|
# PCAP_ROOT_DIR Set this variable to the root installation of
|
|
|
|
# libpcap if the module has problems finding the
|
|
|
|
# proper installation path.
|
|
|
|
#
|
|
|
|
# Variables defined by this module:
|
|
|
|
#
|
|
|
|
# PCAP_FOUND System has libpcap, include and library dirs found
|
|
|
|
# PCAP_INCLUDE_DIR The libpcap include directories.
|
|
|
|
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
|
|
|
# library e.g. required by pf_ring's libpcap)
|
|
|
|
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
|
|
|
find_package(PCAP)
|
|
|
|
if(NOT PCAP_FOUND)
|
|
|
|
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
|
|
|
endif()
|
|
|
|
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
|
|
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
|
|
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
|
|
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
|
|
|
|
|
|
|
endif(ENABLE_RAW_UDP)
|
|
|
|
|
2015-05-08 06:59:38 +00:00
|
|
|
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
2013-10-14 16:51:47 +00:00
|
|
|
unpack_byte_2bit_samples.cc
|
2015-07-02 15:59:43 +00:00
|
|
|
unpack_byte_2bit_cpx_samples.cc
|
2018-05-16 08:49:27 +00:00
|
|
|
unpack_byte_4bit_samples.cc
|
2015-01-14 16:27:26 +00:00
|
|
|
unpack_intspir_1bit_samples.cc
|
2015-05-09 02:20:44 +00:00
|
|
|
rtl_tcp_signal_source_c.cc
|
2015-09-30 21:15:00 +00:00
|
|
|
unpack_2bit_samples.cc
|
2018-01-12 12:15:20 +00:00
|
|
|
unpack_spir_gss6450_samples.cc
|
2018-01-23 16:31:42 +00:00
|
|
|
labsat23_source.cc
|
2018-05-16 09:36:37 +00:00
|
|
|
${OPT_DRIVER_SOURCES}
|
2013-10-14 16:51:47 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
2017-06-21 06:54:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2015-05-10 12:57:43 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
|
2013-10-14 16:51:47 +00:00
|
|
|
${GLOG_INCLUDE_DIRS}
|
|
|
|
${GFlags_INCLUDE_DIRS}
|
|
|
|
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
2015-05-08 06:59:38 +00:00
|
|
|
${Boost_INCLUDE_DIRS}
|
2018-05-16 09:36:37 +00:00
|
|
|
${OPT_DRIVER_INCLUDE_DIRS}
|
2013-10-14 16:51:47 +00:00
|
|
|
)
|
|
|
|
|
2014-06-28 01:55:57 +00:00
|
|
|
file(GLOB SIGNAL_SOURCE_GR_BLOCKS_HEADERS "*.h")
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
|
2014-06-28 01:55:57 +00:00
|
|
|
add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES} ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
|
|
|
|
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
|
2018-05-11 11:21:53 +00:00
|
|
|
target_link_libraries(signal_source_gr_blocks
|
|
|
|
signal_source_lib
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${Boost_LIBRARIES}
|
2018-05-16 09:36:37 +00:00
|
|
|
${OPT_LIBRARIES}
|
2018-05-11 11:21:53 +00:00
|
|
|
)
|
2015-05-19 18:28:02 +00:00
|
|
|
add_dependencies(signal_source_gr_blocks glog-${glog_RELEASE})
|