1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-12-04 07:38:08 +00:00

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

View File

@@ -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.
#
@@ -19,19 +19,6 @@
set(CHANNEL_ADAPTER_SOURCES channel.cc)
set(CHANNEL_ADAPTER_HEADERS channel.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(channel_adapters
${CHANNEL_ADAPTER_SOURCES}
${CHANNEL_ADAPTER_HEADERS}
@@ -40,8 +27,16 @@ add_library(channel_adapters
source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
target_link_libraries(channel_adapters
channel_fsm
${GNURADIO_RUNTIME_LIBRARIES}
${Boost_LIBRARIES}
gnss_sdr_flags
PUBLIC
Gnuradio::runtime
channel_fsm
gnss_rx
PRIVATE
gnss_sdr_flags
Glog::glog
)
set_property(TARGET channel_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@@ -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.
#
@@ -26,23 +26,21 @@ set(CHANNEL_FSM_HEADERS
channel_msg_receiver_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT CHANNEL_FSM_HEADERS)
list(SORT CHANNEL_FSM_SOURCES)
add_library(channel_fsm ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
source_group(Headers FILES ${CHANNEL_FSM_HEADERS})
add_dependencies(channel_fsm glog-${glog_RELEASE})
target_link_libraries(channel_fsm gnss_rx)
target_link_libraries(channel_fsm
PUBLIC
gnss_rx
Gnuradio::runtime
PRIVATE
Glog::glog
)
set_property(TARGET channel_fsm
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)