mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-12 19:20:32 +00:00
CMake: Move log4cpp/spdlog handling to the GNURADIO cmake module
This commit is contained in:
parent
5186b737b7
commit
8247021f32
@ -628,35 +628,6 @@ 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
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# spdlog - https://github.com/gabime/spdlog
|
||||
################################################################################
|
||||
if(GNURADIO_USES_SPDLOG)
|
||||
find_package(spdlog REQUIRED CONFIG)
|
||||
set_package_properties(spdlog PROPERTIES
|
||||
URL "https://github.com/gabime/spdlog"
|
||||
DESCRIPTION "Very fast, header-only/compiled, C++ logging library"
|
||||
PURPOSE "Required by GNU Radio."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
target_link_libraries(Gnuradio::runtime INTERFACE spdlog::spdlog)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Detect availability of std::filesystem and set C++ standard accordingly
|
||||
################################################################################
|
||||
|
@ -411,10 +411,23 @@ if(GNURADIO_RUNTIME_INCLUDE_DIRS)
|
||||
endif()
|
||||
endforeach()
|
||||
if(${_uses_log4cpp})
|
||||
set(GNURADIO_USES_LOG4CPP TRUE)
|
||||
find_package(LOG4CPP)
|
||||
set_package_properties(LOG4CPP PROPERTIES
|
||||
PURPOSE "Required by GNU Radio."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
target_link_libraries(Gnuradio::filter INTERFACE Log4cpp::log4cpp)
|
||||
endif()
|
||||
if(${_uses_spdlog})
|
||||
set(GNURADIO_USES_SPDLOG TRUE)
|
||||
find_package(spdlog REQUIRED CONFIG)
|
||||
set_package_properties(spdlog PROPERTIES
|
||||
URL "https://github.com/gabime/spdlog"
|
||||
DESCRIPTION "Very fast, header-only/compiled, C++ logging library"
|
||||
PURPOSE "Required by GNU Radio."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
target_link_libraries(Gnuradio::runtime INTERFACE spdlog::spdlog)
|
||||
target_link_libraries(Gnuradio::blocks INTERFACE spdlog::spdlog)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -62,6 +62,7 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||
- The configuration options at building time `-DENABLE_OWN_GLOG`,
|
||||
`-DENABLE_OWN_ARMADILLO`, and `-DENABLE_OWN_GNSSTK` can now be switched `ON`
|
||||
and `OFF` without the need to start from an empty buiding folder.
|
||||
- Improved CMake handling of the spdlog library used by GNU Radio >= 3.10.
|
||||
|
||||
### Improvements in Usability:
|
||||
|
||||
|
@ -48,13 +48,6 @@ target_link_libraries(input_filter_gr_blocks
|
||||
Volk::volk
|
||||
)
|
||||
|
||||
if(LOG4CPP_FOUND)
|
||||
target_link_libraries(input_filter_gr_blocks
|
||||
PRIVATE
|
||||
Log4cpp::log4cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(input_filter_gr_blocks
|
||||
PUBLIC
|
||||
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
|
||||
|
Loading…
Reference in New Issue
Block a user