2018-10-16 15:25:42 +00:00
|
|
|
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
|
|
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
|
|
|
find_package(GPSTK QUIET)
|
|
|
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
2018-11-18 19:46:38 +00:00
|
|
|
include(GNUInstallDirs)
|
2018-11-21 14:28:17 +00:00
|
|
|
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
2018-11-21 23:35:21 +00:00
|
|
|
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|
2018-10-16 15:25:42 +00:00
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
|
|
|
${GFlags_INCLUDE_DIRS}
|
|
|
|
${Boost_INCLUDE_DIRS}
|
|
|
|
${GPSTK_INCLUDE_DIR}/gpstk
|
|
|
|
${GPSTK_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
|
2018-10-18 13:15:15 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
|
|
|
|
2018-10-16 15:25:42 +00:00
|
|
|
add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
|
|
|
|
|
|
|
target_link_libraries(rinex2assist
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${GPSTK_LIBRARY}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
gnss_sp_libs
|
2018-11-21 23:35:21 +00:00
|
|
|
gnss_rx
|
|
|
|
)
|
2018-10-16 15:25:42 +00:00
|
|
|
|
|
|
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
|
|
|
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|
2018-10-16 15:25:42 +00:00
|
|
|
|
|
|
|
add_custom_command(TARGET rinex2assist POST_BUILD
|
2018-11-21 23:35:21 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rinex2assist>
|
2018-11-24 17:40:34 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
2018-11-21 23:35:21 +00:00
|
|
|
)
|
2018-10-16 15:25:42 +00:00
|
|
|
|
|
|
|
install(TARGETS rinex2assist
|
2018-11-21 23:35:21 +00:00
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
COMPONENT "rinex2assist"
|
2018-10-16 15:25:42 +00:00
|
|
|
)
|