1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-24 22:13:15 +00:00

Get GPSTK version if found

This can be important in the future since current version is a c++17 blocker
This commit is contained in:
Carles Fernandez 2019-06-19 20:54:45 +02:00
parent d5ecb0f861
commit c30975064e
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 22 additions and 2 deletions

View File

@ -44,10 +44,21 @@ find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
$ENV{GPSTK_ROOT}/${CMAKE_INSTALL_LIBDIR}
)
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# handle the QUIET and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
if(GPSTK_FOUND)
if(EXISTS ${CMAKE_INSTALL_FULL_DATADIR}/cmake/GPSTK/GPSTKConfigVersion.cmake)
include(${CMAKE_INSTALL_FULL_DATADIR}/cmake/GPSTK/GPSTKConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(GPSTK_VERSION ${PACKAGE_VERSION})
endif()
unset(PACKAGE_VERSION)
endif()
mark_as_advanced(GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
if(GPSTK_FOUND AND NOT TARGET Gpstk::gpstk)

View File

@ -191,10 +191,19 @@ add_feature_info(ENABLE_GNSS_SIM_INSTALL ENABLE_GNSS_SIM_INSTALL "Enables downlo
find_package(GPSTK)
set_package_properties(GPSTK PROPERTIES
URL "http://www.gpstk.org"
DESCRIPTION "Library and suite of applications for satellite navigation"
PURPOSE "Used in some Extra Tests."
TYPE OPTIONAL
)
if(GPSTK_FOUND AND GPSTK_VERSION)
set_package_properties(GPSTK PROPERTIES
DESCRIPTION "Library and suite of applications for satellite navigation (found: v${GPSTK_VERSION})"
)
else()
set_package_properties(GPSTK PROPERTIES
DESCRIPTION "Library and suite of applications for satellite navigation"
)
endif()
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
if(ENABLE_FPGA)
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")