1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-16 05:00:35 +00:00
gnss-sdr/src/utils/front-end-cal/CMakeLists.txt

102 lines
2.6 KiB
CMake
Raw Normal View History

2019-02-03 18:24:44 +00:00
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
set(FRONT_END_CAL_SOURCES front_end_cal.cc)
set(FRONT_END_CAL_HEADERS front_end_cal.h)
add_library(front_end_cal_lib ${FRONT_END_CAL_SOURCES} ${FRONT_END_CAL_HEADERS})
source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
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
acquisition_adapters
2019-02-03 18:24:44 +00:00
gnss_sdr_flags
channel_libs
algorithms_libs
core_receiver
core_libs
2019-02-03 18:24:44 +00:00
PRIVATE
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
)
2018-11-18 20:24:54 +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()
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
if(${FILESYSTEM_FOUND})
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(front-end-cal PRIVATE std::filesystem)
else()
target_link_libraries(front-end-cal PRIVATE Boost::filesystem Boost::system)
endif()
target_link_libraries(front-end-cal
2019-02-03 18:24:44 +00:00
PUBLIC
core_libs
core_receiver
2019-02-03 18:24:44 +00:00
front_end_cal_lib
gnss_sdr_flags
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}"
)
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(front-end-cal
PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
endif()
endif()
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>)
install(TARGETS front-end-cal
RUNTIME DESTINATION bin
COMPONENT "front-end-cal"
)
find_program(GZIP gzip
/bin
/usr/bin
/usr/local/bin
/opt/local/bin
/sbin
)
2014-12-15 18:21:14 +00:00
if(NOT GZIP_NOTFOUND)
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/manpage/front-end-cal-manpage
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/front-end-cal.1.gz")
install(FILES ${CMAKE_BINARY_DIR}/front-end-cal.1.gz DESTINATION share/man/man1)
2018-11-24 17:40:34 +00:00
endif()