Update to modern CMake usage

This commit is contained in:
Carles Fernandez
2019-02-03 19:24:44 +01:00
parent f3eef2f513
commit 8ae72fe458
72 changed files with 1387 additions and 1258 deletions
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@@ -27,20 +27,6 @@ set(RESAMPLER_ADAPTER_HEADERS
mmse_resampler_conditioner.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
list(SORT RESAMPLER_ADAPTER_HEADERS)
list(SORT RESAMPLER_ADAPTER_SOURCES)
@@ -51,4 +37,21 @@ add_library(resampler_adapters
source_group(Headers FILES ${RESAMPLER_ADAPTER_HEADERS})
target_link_libraries(resampler_adapters resampler_gr_blocks)
target_link_libraries(resampler_adapters
PUBLIC
Gnuradio::runtime
resampler_gr_blocks
gnss_rx
PRIVATE
Glog::glog
Volk::volk
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
target_compile_definitions(resampler_adapters PUBLIC -DGR_GREATER_38=1)
endif()
set_property(TARGET resampler_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@@ -29,22 +29,26 @@ set(RESAMPLER_GR_BLOCKS_HEADERS
direct_resampler_conditioner_cb.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT RESAMPLER_GR_BLOCKS_HEADERS)
list(SORT RESAMPLER_GR_BLOCKS_SOURCES)
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
add_library(resampler_gr_blocks
${RESAMPLER_GR_BLOCKS_SOURCES}
${RESAMPLER_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
target_link_libraries(resampler_gr_blocks
PUBLIC
Gnuradio::runtime
Volk::volk
PRIVATE
Gflags::gflags
Glog::glog
)
add_dependencies(resampler_gr_blocks glog-${glog_RELEASE})
set_property(TARGET resampler_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)