1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-20 01:57:41 +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
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)