1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-15 06:14:58 +00:00
gnss-sdr/src/utils/front-end-cal/CMakeLists.txt

145 lines
3.5 KiB
CMake
Raw Normal View History

# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(USE_CMAKE_TARGET_SOURCES)
add_library(front_end_cal_lib STATIC)
target_sources(front_end_cal_lib
PRIVATE
front_end_cal.cc
PUBLIC
front_end_cal.h
)
else()
source_group(Headers FILES front_end_cal.h)
add_library(front_end_cal_lib front_end_cal.cc front_end_cal.h)
endif()
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()
if(USE_CMAKE_TARGET_SOURCES)
add_executable(front-end-cal)
target_sources(front-end-cal PRIVATE main.cc)
else()
add_executable(front-end-cal main.cc)
endif()
target_link_libraries(front-end-cal
PRIVATE
core_receiver
algorithms_libs
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
Glog::glog
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(front-end-cal
PRIVATE -DGNURADIO_USES_STD_POINTERS=1
)
endif()
2019-02-03 18:24:44 +00:00
target_compile_definitions(front-end-cal
PRIVATE -DGNSS_SDR_VERSION="${VERSION}"
PRIVATE -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
)
if(USE_GENERIC_LAMBDAS)
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)
target_compile_definitions(front-end-cal
PRIVATE
"$<$<COMPILE_FEATURES:cxx_generic_lambdas>:${has_generic_lambdas}>"
"$<$<NOT:$<COMPILE_FEATURES:cxx_generic_lambdas>>:${no_has_generic_lambdas}>"
)
else()
target_compile_definitions(front-end-cal
PRIVATE
-DHAS_GENERIC_LAMBDA=0
)
endif()
if(USE_BOOST_BIND_PLACEHOLDERS)
2020-05-18 20:50:34 +00:00
target_compile_definitions(front-end-cal
PRIVATE
-DUSE_BOOST_BIND_PLACEHOLDERS=1
2020-05-18 20:50:34 +00:00
)
endif()
if(PMT_USES_BOOST_ANY)
target_compile_definitions(front-end-cal
PRIVATE
-DPMT_USES_BOOST_ANY=1
)
endif()
include(XcodeRemoveWarningDuplicates)
xcode_remove_warning_duplicates(front-end-cal)
2024-04-12 16:15:33 +00:00
if(ENABLE_STRIP)
set_target_properties(front-end-cal PROPERTIES LINK_FLAGS "-s")
endif()
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>
2020-06-23 09:06:26 +00:00
${LOCAL_INSTALL_BASE_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 ${GNSSSDR_SOURCE_DIR}/docs/manpage/front-end-cal-manpage
WORKING_DIRECTORY ${GNSSSDR_BINARY_DIR} OUTPUT_FILE "${GNSSSDR_BINARY_DIR}/front-end-cal.1.gz"
2020-06-23 09:06:26 +00:00
)
install(FILES ${GNSSSDR_BINARY_DIR}/front-end-cal.1.gz DESTINATION share/man/man1)
2018-11-24 17:40:34 +00:00
endif()