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
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Find GR-DBFCTTC Module
|
|
|
|
########################################################################
|
|
|
|
|
2019-11-02 23:55:48 +00:00
|
|
|
#
|
|
|
|
# Provides the following imported target:
|
|
|
|
# Gnuradio::dbfcttc
|
|
|
|
#
|
|
|
|
|
2020-11-01 13:35:15 +00:00
|
|
|
if(NOT PKG_CONFIG_FOUND)
|
|
|
|
include(FindPkgConfig)
|
|
|
|
endif()
|
|
|
|
|
2018-12-14 17:59:36 +00:00
|
|
|
pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
|
|
|
|
|
2020-02-29 13:33:09 +00:00
|
|
|
if(NOT GRDBFCTTC_ROOT)
|
|
|
|
set(GRDBFCTTC_ROOT_USER_DEFINED /usr/local)
|
|
|
|
else()
|
|
|
|
set(GRDBFCTTC_ROOT_USER_DEFINED ${GRDBFCTTC_ROOT})
|
|
|
|
endif()
|
|
|
|
if(DEFINED ENV{GRDBFCTTC_ROOT})
|
|
|
|
set(GRDBFCTTC_ROOT_USER_DEFINED
|
|
|
|
${GRDBFCTTC_ROOT_USER_DEFINED}
|
|
|
|
$ENV{GRDBFCTTC_ROOT}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if(DEFINED ENV{GR_DBFCTTC_DIR})
|
|
|
|
set(GRDBFCTTC_ROOT_USER_DEFINED
|
|
|
|
${GRDBFCTTC_ROOT_USER_DEFINED}
|
|
|
|
$ENV{GR_DBFCTTC_DIR}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
set(GRDBFCTTC_ROOT_USER_DEFINED
|
|
|
|
${GRDBFCTTC_ROOT_USER_DEFINED}
|
|
|
|
${CMAKE_INSTALL_PREFIX}
|
|
|
|
)
|
|
|
|
|
2018-12-14 17:59:36 +00:00
|
|
|
find_path(
|
|
|
|
GR_DBFCTTC_INCLUDE_DIRS
|
|
|
|
NAMES dbfcttc/api.h
|
2019-09-30 12:58:34 +00:00
|
|
|
HINTS ${PC_GR_DBFCTTC_INCLUDEDIR}
|
2020-02-29 13:33:09 +00:00
|
|
|
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/include
|
|
|
|
/usr/include
|
2018-12-14 17:59:36 +00:00
|
|
|
/usr/local/include
|
2019-09-30 12:58:34 +00:00
|
|
|
/opt/local/include
|
2018-12-14 17:59:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(
|
|
|
|
GR_DBFCTTC_LIBRARIES
|
|
|
|
NAMES gnuradio-dbfcttc
|
2019-09-30 12:58:34 +00:00
|
|
|
HINTS ${PC_GR_DBFCTTC_LIBDIR}
|
2020-02-29 13:33:09 +00:00
|
|
|
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/lib
|
|
|
|
${GRDBFCTTC_ROOT_USER_DEFINED}/lib64
|
|
|
|
/usr/lib
|
2018-12-14 17:59:36 +00:00
|
|
|
/usr/lib64
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/local/lib64
|
2019-09-30 12:58:34 +00:00
|
|
|
/opt/local/lib
|
2018-12-14 17:59:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(GRDBFCTTC DEFAULT_MSG GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
|
2019-02-04 17:17:35 +00:00
|
|
|
|
|
|
|
if(GRDBFCTTC_FOUND AND NOT TARGET Gnuradio::dbfcttc)
|
|
|
|
add_library(Gnuradio::dbfcttc SHARED IMPORTED)
|
|
|
|
set_target_properties(Gnuradio::dbfcttc PROPERTIES
|
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
|
|
|
IMPORTED_LOCATION "${GR_DBFCTTC_LIBRARIES}"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${GR_DBFCTTC_INCLUDE_DIRS}"
|
|
|
|
INTERFACE_LINK_LIBRARIES "${GR_DBFCTTC_LIBRARIES}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-12-14 17:59:36 +00:00
|
|
|
mark_as_advanced(GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
|