2019-02-03 18:24:44 +00:00
|
|
|
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
|
2013-07-05 17:00:48 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-02-08 00:20:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2013-07-05 17:00:48 +00:00
|
|
|
#
|
|
|
|
|
2013-10-23 18:27:40 +00:00
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
set(FRONT_END_CAL_SOURCES front_end_cal.cc)
|
2018-10-04 20:35:44 +00:00
|
|
|
set(FRONT_END_CAL_HEADERS front_end_cal.h)
|
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
add_library(front_end_cal_lib ${FRONT_END_CAL_SOURCES} ${FRONT_END_CAL_HEADERS})
|
|
|
|
source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
|
|
|
|
|
2018-11-21 23:35:21 +00:00
|
|
|
target_link_libraries(front_end_cal_lib
|
2019-02-03 18:24:44 +00:00
|
|
|
PUBLIC
|
|
|
|
Armadillo::armadillo
|
2019-02-07 08:28:20 +00:00
|
|
|
Threads::Threads
|
2019-02-10 17:34:28 +00:00
|
|
|
acquisition_adapters
|
2019-02-03 18:24:44 +00:00
|
|
|
gnss_sdr_flags
|
2019-02-10 17:34:28 +00:00
|
|
|
channel_libs
|
|
|
|
algorithms_libs
|
|
|
|
core_receiver
|
|
|
|
core_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
PRIVATE
|
2019-09-07 10:36:19 +00:00
|
|
|
Boost::headers
|
2019-02-07 08:28:20 +00:00
|
|
|
Gflags::gflags
|
2019-02-03 18:24:44 +00:00
|
|
|
Glog::glog
|
|
|
|
Gnuradio::blocks
|
|
|
|
Gnuradio::runtime
|
2015-10-27 19:18:48 +00:00
|
|
|
)
|
2018-11-18 20:24:54 +00:00
|
|
|
|
2019-02-21 10:42:56 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(front_end_cal_lib
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
2014-11-04 20:28:01 +00:00
|
|
|
|
2019-06-10 19:41:13 +00:00
|
|
|
if(${FILESYSTEM_FOUND})
|
|
|
|
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM=1)
|
2019-06-12 18:39:29 +00:00
|
|
|
if(${find_experimental})
|
|
|
|
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
|
|
|
|
endif()
|
2019-06-10 19:41:13 +00:00
|
|
|
target_link_libraries(front-end-cal PRIVATE std::filesystem)
|
|
|
|
else()
|
|
|
|
target_link_libraries(front-end-cal PRIVATE Boost::filesystem Boost::system)
|
|
|
|
endif()
|
|
|
|
|
2018-11-21 23:35:21 +00:00
|
|
|
target_link_libraries(front-end-cal
|
2019-02-03 18:24:44 +00:00
|
|
|
PUBLIC
|
2019-02-10 17:34:28 +00:00
|
|
|
core_libs
|
|
|
|
core_receiver
|
2019-02-03 18:24:44 +00:00
|
|
|
front_end_cal_lib
|
|
|
|
gnss_sdr_flags
|
2019-09-07 10:36:19 +00:00
|
|
|
Boost::headers
|
2019-02-03 18:24:44 +00:00
|
|
|
PRIVATE
|
2019-02-24 23:02:53 +00:00
|
|
|
Gflags::gflags
|
2019-02-03 18:24:44 +00:00
|
|
|
Glog::glog
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(front-end-cal
|
|
|
|
PUBLIC -DGNSS_SDR_VERSION="${VERSION}"
|
|
|
|
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
2015-10-27 19:18:48 +00:00
|
|
|
)
|
|
|
|
|
2019-02-21 10:42:56 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(front-end-cal
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-04 07:11:28 +00:00
|
|
|
add_custom_command(TARGET front-end-cal POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
|
|
|
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
install(TARGETS front-end-cal
|
2018-11-21 23:35:21 +00:00
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
COMPONENT "front-end-cal"
|
2015-10-27 19:18:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
find_program(GZIP gzip
|
2018-11-21 23:35:21 +00:00
|
|
|
/bin
|
|
|
|
/usr/bin
|
|
|
|
/usr/local/bin
|
|
|
|
/opt/local/bin
|
|
|
|
/sbin
|
|
|
|
)
|
2014-12-15 18:21:14 +00:00
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
if(NOT GZIP_NOTFOUND)
|
|
|
|
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/manpage/front-end-cal-manpage
|
2018-11-21 23:35:21 +00:00
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/front-end-cal.1.gz")
|
2015-10-27 19:18:48 +00:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/front-end-cal.1.gz DESTINATION share/man/man1)
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|