mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 03:30:33 +00:00
Fixes for building against GNU Radio master
Log4cpp has been replaced by spdlog
This commit is contained in:
parent
c2a23dd372
commit
cc38d6bc08
@ -609,13 +609,12 @@ endif()
|
||||
################################################################################
|
||||
# Log4cpp - http://log4cpp.sourceforge.net/
|
||||
################################################################################
|
||||
if(GNURADIO_USES_LOG4CPP)
|
||||
find_package(LOG4CPP)
|
||||
set_package_properties(LOG4CPP PROPERTIES
|
||||
PURPOSE "Required by GNU Radio."
|
||||
TYPE REQUIRED
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(NOT LOG4CPP_FOUND)
|
||||
message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -392,6 +392,23 @@ if(GNURADIO_PMT_INCLUDE_DIRS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check if GNU Radio uses log4cpp or spdlog
|
||||
if(GNURADIO_RUNTIME_INCLUDE_DIRS)
|
||||
if(EXISTS "${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/logger.h")
|
||||
file(STRINGS ${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/logger.h _logger_content)
|
||||
set(_uses_log4cpp FALSE)
|
||||
foreach(_loop_var IN LISTS _logger_content)
|
||||
string(STRIP "${_loop_var}" _file_line)
|
||||
if("#include <log4cpp/Category.hh>" STREQUAL "${_file_line}")
|
||||
set(_uses_log4cpp TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
if(${_uses_log4cpp})
|
||||
set(GNURADIO_USES_LOG4CPP TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_package_properties(GNURADIO PROPERTIES
|
||||
URL "https://www.gnuradio.org/"
|
||||
)
|
||||
|
@ -46,8 +46,14 @@ target_link_libraries(input_filter_gr_blocks
|
||||
algorithms_libs
|
||||
PRIVATE
|
||||
Volk::volk
|
||||
)
|
||||
|
||||
if(LOG4CPP_FOUND)
|
||||
target_link_libraries(input_filter_gr_blocks
|
||||
PRIVATE
|
||||
Log4cpp::log4cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(input_filter_gr_blocks
|
||||
PUBLIC
|
||||
|
@ -21,12 +21,12 @@
|
||||
#include "INIReader.h"
|
||||
#include "command_event.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <boost/any.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <exception>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
|
Loading…
Reference in New Issue
Block a user