2020-02-11 23:04:29 +00:00
|
|
|
# Copyright (C) 2011-2020 (see AUTHORS file for a list of contributors)
|
|
|
|
#
|
|
|
|
# GNSS-SDR is a software-defined Global Navigation Satellite Systems receiver
|
2018-12-14 17:59:36 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-02-08 00:20:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2018-12-14 17:59:36 +00:00
|
|
|
|
2019-02-03 18:24:44 +00:00
|
|
|
#
|
|
|
|
# Provides the following imported target:
|
|
|
|
# Volkgnsssdr::volkgnsssdr
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-12-14 17:59:36 +00:00
|
|
|
########################################################################
|
|
|
|
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
|
|
|
|
########################################################################
|
2019-06-21 00:49:41 +00:00
|
|
|
if(NOT COMMAND feature_summary)
|
|
|
|
include(FeatureSummary)
|
|
|
|
endif()
|
2018-12-14 17:59:36 +00:00
|
|
|
|
2019-07-26 10:42:17 +00:00
|
|
|
pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
|
2018-12-14 17:59:36 +00:00
|
|
|
|
|
|
|
find_path(VOLK_GNSSSDR_INCLUDE_DIRS
|
|
|
|
NAMES volk_gnsssdr/volk_gnsssdr.h
|
2019-09-30 12:58:34 +00:00
|
|
|
HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR}
|
|
|
|
PATHS /usr/include
|
|
|
|
/usr/local/include
|
|
|
|
/opt/local/include
|
2018-12-14 17:59:36 +00:00
|
|
|
${GNURADIO_INSTALL_PREFIX}/include
|
|
|
|
${VOLKGNSSSDR_ROOT}/include
|
|
|
|
$ENV{VOLKGNSSSDR_ROOT}/include
|
2019-09-30 12:58:34 +00:00
|
|
|
$ENV{VOLK_GNSSSDR_DIR}/include
|
2018-12-14 17:59:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(VOLK_GNSSSDR_LIBRARIES
|
|
|
|
NAMES volk_gnsssdr
|
2019-09-30 12:58:34 +00:00
|
|
|
HINTS ${PC_VOLK_GNSSSDR_LIBDIR}
|
|
|
|
PATHS /usr/lib
|
2018-12-14 17:59:36 +00:00
|
|
|
/usr/lib64
|
2019-09-30 12:58:34 +00:00
|
|
|
/usr/local/lib
|
|
|
|
/usr/local/lib64
|
|
|
|
/opt/local/lib
|
2018-12-14 17:59:36 +00:00
|
|
|
${GNURADIO_INSTALL_PREFIX}/lib
|
|
|
|
${VOLKGNSSSDR_ROOT}/lib
|
|
|
|
$ENV{VOLKGNSSSDR_ROOT}/lib
|
|
|
|
${VOLKGNSSSDR_ROOT}/lib64
|
|
|
|
$ENV{VOLKGNSSSDR_ROOT}/lib64
|
2019-09-30 12:58:34 +00:00
|
|
|
$ENV{VOLK_GNSSSDR_DIR}/lib
|
2018-12-14 17:59:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
|
|
|
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
2019-02-03 18:24:44 +00:00
|
|
|
|
2019-06-23 22:24:08 +00:00
|
|
|
if(PC_VOLK_GNSSSDR_VERSION)
|
|
|
|
set(VOLKGNSSSDR_VERSION ${PC_VOLK_GNSSSDR_VERSION})
|
|
|
|
endif()
|
2019-06-21 00:49:41 +00:00
|
|
|
|
2019-06-23 22:24:08 +00:00
|
|
|
if(VOLKGNSSSDR_FOUND AND VOLKGNSSSDR_VERSION)
|
|
|
|
set_package_properties(VOLKGNSSSDR PROPERTIES
|
|
|
|
DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR (found: v${VOLKGNSSSDR_VERSION})."
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set_package_properties(VOLKGNSSSDR PROPERTIES
|
|
|
|
DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR."
|
|
|
|
)
|
|
|
|
endif()
|
2019-02-03 18:24:44 +00:00
|
|
|
|
2019-02-08 14:16:39 +00:00
|
|
|
if(VOLKGNSSSDR_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
|
2019-02-03 18:24:44 +00:00
|
|
|
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
|
|
|
|
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
|
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
|
|
|
IMPORTED_LOCATION "${VOLK_GNSSSDR_LIBRARIES}"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
|
|
|
|
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
|
|
|
|
)
|
|
|
|
endif()
|