1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-12-05 08:08:06 +00:00

CMake: centralize find paths in a single file

Improve Macports/Homebrew detection. Do not hardcode /opt/local or /opt/homebrew
This commit is contained in:
Carles Fernandez
2025-02-16 22:10:20 +01:00
parent a6daa5ad7e
commit fa1e9209c5
46 changed files with 471 additions and 501 deletions

View File

@@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-FileCopyrightText: 2011-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
@@ -17,6 +17,10 @@ if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
if(NOT GRDBFCTTC_ROOT)
@@ -46,9 +50,7 @@ find_path(
NAMES dbfcttc/api.h
HINTS ${PC_GR_DBFCTTC_INCLUDEDIR}
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
${GNSSSDR_INCLUDE_PATHS}
)
find_library(
@@ -57,11 +59,7 @@ find_library(
HINTS ${PC_GR_DBFCTTC_LIBDIR}
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/lib
${GRDBFCTTC_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)