1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-12 19:20:32 +00:00

Fix detection of Volk version if pkg-config is not present

This commit is contained in:
Carles Fernandez 2020-02-10 01:16:58 +01:00
parent 35cd66cb55
commit aeaf68fe47
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 9 additions and 9 deletions

View File

@ -84,6 +84,7 @@ if(NOT VOLK_VERSION)
list(GET VOLK_LIBRARIES 0 FIRST_DIR)
get_filename_component(VOLK_LIB_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${VOLK_LIB_DIR}/cmake/volk/VolkConfigVersion.cmake)
set(PACKAGE_FIND_VERSION_MAJOR 0)
include(${VOLK_LIB_DIR}/cmake/volk/VolkConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2015-2020 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@ -8,14 +8,13 @@ set(MAJOR_VERSION @VERSION_INFO_MAJOR_VERSION@)
set(MINOR_VERSION @VERSION_INFO_MINOR_VERSION@)
set(MAINT_VERSION @VERSION_INFO_MAINT_VERSION@)
set(PACKAGE_VERSION
${MAJOR_VERSION}.${MINOR_VERSION}.${MAINT_VERSION})
set(PACKAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${MAINT_VERSION})
if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION})
if(${PACKAGE_FIND_VERSION_MINOR} EQUAL ${MINOR_VERSION})
if(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
set(PACKAGE_VERSION_EXACT 1) # exact match for API version
set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version
if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL ${MAJOR_VERSION})
if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL ${MINOR_VERSION})
if(NOT "${PACKAGE_FIND_VERSION_PATCH}" GREATER ${MAINT_VERSION})
set(PACKAGE_VERSION_EXACT 1) # exact match for API version
set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version
endif()
endif()
endif()
endif()