1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-26 00:46:59 +00:00

Search for CMake config

This commit is contained in:
Carles Fernandez 2019-06-24 02:33:53 +02:00
parent bbe7707282
commit 59281117e9
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -30,6 +30,7 @@ find_path(TELEORBIT_INCLUDE_DIRS
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
/opt/local/include
${TELEORBIT_ROOT}/include
$ENV{TELEORBIT_ROOT}/include
)
@ -44,6 +45,7 @@ find_library(TELEORBIT_LIBRARIES
/usr/local/lib64
/usr/lib
/usr/lib64
/opt/local/lib
${TELEORBIT_ROOT}/lib
$ENV{TELEORBIT_ROOT}/lib
${TELEORBIT_ROOT}/lib64
@ -57,6 +59,18 @@ if(PC_TELEORBIT_VERSION)
set(TELEORBIT_VERSION ${PC_TELEORBIT_VERSION})
endif()
if(NOT TELEORBIT_VERSION)
list(GET TELEORBIT_LIBRARIES 0 FIRST_DIR)
get_filename_component(TELEORBIT_LIBRARIES_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${TELEORBIT_LIBRARIES_DIR}/cmake/teleorbit/TeleorbitConfigVersion.cmake)
include(${TELEORBIT_LIBRARIES_DIR}/cmake/teleorbit/TeleorbitConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(TELEORBIT_VERSION ${PACKAGE_VERSION})
endif()
unset(PACKAGE_VERSION)
endif()
if(TELEORBIT_FOUND AND TELEORBIT_VERSION)
set_package_properties(TELEORBIT PROPERTIES
DESCRIPTION "The Teleorbit's Flexiband GNU Radio block (found: v${TELEORBIT_VERSION})"