1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-03 04:13:45 +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
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
46 changed files with 471 additions and 501 deletions

View File

@ -611,9 +611,9 @@ set_package_properties(Threads PROPERTIES
################################################################################ ################################################################################
# Set GNSSSDR_LIB_PATHS # Set GNSSSDR_LIB_PATHS and GNSSSDR_INCLUDE_PATHS
################################################################################ ################################################################################
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
@ -2234,21 +2234,21 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
# Fix for macOS # Fix for macOS
find_library(ARPACK_LIBRARY find_library(ARPACK_LIBRARY
NAMES arpack NAMES arpack
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} ${GNSSSDR_LIB_PATHS}
) )
if(ARPACK_LIBRARY) if(ARPACK_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${ARPACK_LIBRARY}) target_link_libraries(Armadillo::armadillo INTERFACE ${ARPACK_LIBRARY})
endif() endif()
find_library(FLEXIBLAS_LIBRARY find_library(FLEXIBLAS_LIBRARY
NAMES flexiblas NAMES flexiblas
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} ${GNSSSDR_LIB_PATHS}
) )
if(FLEXIBLAS_LIBRARY) if(FLEXIBLAS_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${FLEXIBLAS_LIBRARY}) target_link_libraries(Armadillo::armadillo INTERFACE ${FLEXIBLAS_LIBRARY})
endif() endif()
find_library(SUPERLU_LIBRARY find_library(SUPERLU_LIBRARY
NAMES superlu NAMES superlu
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} ${GNSSSDR_LIB_PATHS}
) )
if(SUPERLU_LIBRARY) if(SUPERLU_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${SUPERLU_LIBRARY}) target_link_libraries(Armadillo::armadillo INTERFACE ${SUPERLU_LIBRARY})
@ -2375,23 +2375,23 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
endif() endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if((NOT EXISTS /usr/local/bin/glibtoolize AND NOT EXISTS /opt/local/bin/glibtoolize) OR if((NOT EXISTS /usr/local/bin/glibtoolize AND NOT EXISTS ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize) OR
(NOT EXISTS /usr/local/bin/aclocal AND NOT EXISTS /opt/local/bin/aclocal)) (NOT EXISTS /usr/local/bin/aclocal AND NOT EXISTS ${MACOS_PACKAGES_PREFIX}/bin/aclocal))
message(" libtool/automake tools have not been found.") message(" libtool/automake tools have not been found.")
message(" You can try to install them by typing:") message(" You can try to install them by typing:")
message(" 'sudo port install libtool automake', if you use Macports, or 'brew install libtool automake', if you use Homebrew") message(" 'sudo port install libtool automake', if you use Macports, or 'brew install libtool automake', if you use Homebrew")
message(FATAL_ERROR "libtool/automake tools are required to build matio from source") message(FATAL_ERROR "libtool/automake tools are required to build matio from source")
endif() endif()
if(CMAKE_GENERATOR STREQUAL Xcode) if(CMAKE_GENERATOR STREQUAL Xcode)
if(EXISTS /opt/local/bin/glibtoolize OR EXISTS /opt/local/bin/aclocal) if(EXISTS ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize OR EXISTS ${MACOS_PACKAGES_PREFIX}/bin/aclocal)
if(NOT EXISTS /usr/local/bin/glibtoolize OR NOT EXISTS /usr/local/bin/aclocal) if(NOT EXISTS /usr/local/bin/glibtoolize OR NOT EXISTS /usr/local/bin/aclocal)
message(" WARNING: libtool/atomake binaries cannot be found by Xcode. Please do:") message(" WARNING: libtool/atomake binaries cannot be found by Xcode. Please do:")
message("sudo ln -s /opt/local/bin/glibtoolize /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize /usr/local/bin/")
message("sudo ln -s /opt/local/bin/aclocal /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/aclocal /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autom4te /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autom4te /usr/local/bin/")
message("sudo ln -s /opt/local/bin/automake /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/automake /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autoconf /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autoconf /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autoreconf /usr/local/bin/") # not needed by Matio, but by Protocol Buffers message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autoreconf /usr/local/bin/") # not needed by Matio, but by Protocol Buffers
message(FATAL_ERROR "libtool/automake tools cannot be found by Xcode") message(FATAL_ERROR "libtool/automake tools cannot be found by Xcode")
endif() endif()
endif() endif()
@ -2402,8 +2402,8 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
get_filename_component(HDF5_BASE_DIR2 ${HDF5_FIRST_DIR} DIRECTORY) get_filename_component(HDF5_BASE_DIR2 ${HDF5_FIRST_DIR} DIRECTORY)
get_filename_component(HDF5_BASE_DIR ${HDF5_BASE_DIR2} DIRECTORY) get_filename_component(HDF5_BASE_DIR ${HDF5_BASE_DIR2} DIRECTORY)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(EXISTS /opt/local/include/hdf5.h) if(EXISTS ${MACOS_PACKAGES_PREFIX}/include/hdf5.h)
set(HDF5_BASE_DIR /opt/local) set(HDF5_BASE_DIR ${MACOS_PACKAGES_PREFIX})
endif() endif()
if(EXISTS /usr/local/include/hdf5.h) if(EXISTS /usr/local/include/hdf5.h)
set(HDF5_BASE_DIR /usr/local) set(HDF5_BASE_DIR /usr/local)
@ -2785,23 +2785,23 @@ if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSI
endif() endif()
endif() endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if((NOT EXISTS /usr/local/bin/glibtoolize AND NOT EXISTS /opt/local/bin/glibtoolize) OR if((NOT EXISTS /usr/local/bin/glibtoolize AND NOT EXISTS ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize) OR
(NOT EXISTS /usr/local/bin/aclocal AND NOT EXISTS /opt/local/bin/aclocal)) (NOT EXISTS /usr/local/bin/aclocal AND NOT EXISTS ${MACOS_PACKAGES_PREFIX}/bin/aclocal))
message(" libtool/automake tools have not been found.") message(" libtool/automake tools have not been found.")
message(" You can try to install them by typing:") message(" You can try to install them by typing:")
message(" 'sudo port install libtool automake', if you use Macports, or 'brew install libtool automake', if you use Homebrew") message(" 'sudo port install libtool automake', if you use Macports, or 'brew install libtool automake', if you use Homebrew")
message(FATAL_ERROR "libtool/automake tools are required to build Protocol Buffers from source") message(FATAL_ERROR "libtool/automake tools are required to build Protocol Buffers from source")
endif() endif()
if(CMAKE_GENERATOR STREQUAL Xcode) if(CMAKE_GENERATOR STREQUAL Xcode)
if(EXISTS /opt/local/bin/glibtoolize OR EXISTS /opt/local/bin/aclocal) if(EXISTS ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize OR EXISTS ${MACOS_PACKAGES_PREFIX}/bin/aclocal)
if(NOT EXISTS /usr/local/bin/glibtoolize OR NOT EXISTS /usr/local/bin/aclocal) if(NOT EXISTS /usr/local/bin/glibtoolize OR NOT EXISTS /usr/local/bin/aclocal)
message(" WARNING: libtool/automake binaries cannot be found by Xcode. Please do:") message(" WARNING: libtool/automake binaries cannot be found by Xcode. Please do:")
message("sudo ln -s /opt/local/bin/glibtoolize /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/glibtoolize /usr/local/bin/")
message("sudo ln -s /opt/local/bin/aclocal /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/aclocal /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autom4te /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autom4te /usr/local/bin/")
message("sudo ln -s /opt/local/bin/automake /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/automake /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autoconf /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autoconf /usr/local/bin/")
message("sudo ln -s /opt/local/bin/autoreconf /usr/local/bin/") message("sudo ln -s ${MACOS_PACKAGES_PREFIX}/bin/autoreconf /usr/local/bin/")
message(FATAL_ERROR "libtool/automake tools cannot be found by Xcode") message(FATAL_ERROR "libtool/automake tools cannot be found by Xcode")
endif() endif()
endif() endif()

View File

@ -127,13 +127,14 @@ This section describes how to set up the compilation environment in GNU/Linux or
- Tested distributions: Ubuntu 14.04 LTS and above; Debian 9.0 "stretch" and - Tested distributions: Ubuntu 14.04 LTS and above; Debian 9.0 "stretch" and
above; Arch Linux; Fedora 26 and above; OpenSUSE 42.3 and above. above; Arch Linux; Fedora 26 and above; OpenSUSE 42.3 and above.
- Supported microprocessor architectures: - Supported microprocessor architectures:
- i386: Intel x86 instruction set (32-bit microprocessors).
- amd64: also known as x86-64, the 64-bit version of the x86 instruction set, - amd64: also known as x86-64, the 64-bit version of the x86 instruction set,
originally created by AMD and implemented by AMD, Intel, VIA, and others. originally created by AMD and implemented by AMD, Intel, VIA, and others.
- armel: ARM embedded ABI, supported on ARM v4t and higher. - armel: ARM embedded ABI, supported on ARM v4t and higher.
- armhf: ARM hard float, ARMv7 + VFP3-D16 floating-point hardware extension + - armhf: ARM hard float, ARMv7 + VFP3-D16 floating-point hardware extension +
Thumb-2 instruction set and above. Thumb-2 instruction set and above.
- arm64: ARM 64 bits or ARMv8. - arm64: ARM 64 bits or ARMv8. Also known as AArch64.
- i386: Intel x86 instruction set (32-bit microprocessors).
- loong64: 64-bit version of LoongArch, a RISC-style instruction set architecture developed by Loongson Technology.
- mips: MIPS architecture (big-endian, such as those manufactured by SGI). - mips: MIPS architecture (big-endian, such as those manufactured by SGI).
- mipsel: MIPS architecture (little-endian, such as Loongson 3). - mipsel: MIPS architecture (little-endian, such as Loongson 3).
- mips64el: 64-bit version of MIPS architecture. - mips64el: 64-bit version of MIPS architecture.
@ -792,7 +793,7 @@ $ sudo port selfupdate
$ sudo port upgrade outdated $ sudo port upgrade outdated
$ sudo port install armadillo cmake pkgconfig protobuf3-cpp pugixml openssl3 $ sudo port install armadillo cmake pkgconfig protobuf3-cpp pugixml openssl3
$ sudo port install gnuradio +uhd +grc +zeromq $ sudo port install gnuradio +uhd +grc +zeromq
$ sudo port install boost matio libad9361-iio libiio $ sudo port install boost matio libad9361-iio libiio abseil
$ sudo port install py313-mako $ sudo port install py313-mako
$ sudo port install doxygen +docs $ sudo port install doxygen +docs
``` ```

View File

@ -7,6 +7,10 @@
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate # Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
# framework, which causes a bug when the BeiDou constellation is enabled # framework, which causes a bug when the BeiDou constellation is enabled
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
if(NOT BLAS_ROOT) if(NOT BLAS_ROOT)
set(BLAS_ROOT_USER_DEFINED /usr/local/lib) set(BLAS_ROOT_USER_DEFINED /usr/local/lib)
else() else()
@ -24,8 +28,8 @@ find_library(BLAS_LIBRARIES
PATHS PATHS
${BLAS_ROOT_USER_DEFINED} ${BLAS_ROOT_USER_DEFINED}
${BLAS_ROOT_USER_DEFINED}/lapack ${BLAS_ROOT_USER_DEFINED}/lapack
/opt/local/lib/lapack ${GNSSSDR_LIB_PATHS}/lapack
/opt/local/lib/ ${GNSSSDR_LIB_PATHS}
/usr/local/opt/lapack/lib /usr/local/opt/lapack/lib
/opt/homebrew/opt/lapack/lib /opt/homebrew/opt/lapack/lib
NO_DEFAULT_PATH NO_DEFAULT_PATH
@ -46,7 +50,7 @@ find_library(LAPACK_LIBRARIES
PATHS PATHS
${BLAS_ROOT_USER_DEFINED} ${BLAS_ROOT_USER_DEFINED}
${BLAS_ROOT_USER_DEFINED}/lapack ${BLAS_ROOT_USER_DEFINED}/lapack
/opt/local/lib/lapack ${GNSSSDR_LIB_PATHS}/lapack
/usr/local/opt/lapack/lib /usr/local/opt/lapack/lib
/opt/homebrew/opt/lapack/lib /opt/homebrew/opt/lapack/lib
NO_DEFAULT_PATH NO_DEFAULT_PATH

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION) execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION)
@ -78,6 +78,7 @@ if(NOT MACOS_DISTRIBUTION)
set(MACOS_DISTRIBUTION "macOS (Unknown version)") set(MACOS_DISTRIBUTION "macOS (Unknown version)")
endif() endif()
set(MACOS_PACKAGES_PREFIX "")
# Detect if MacPorts is installed on this system; if so, return base path and version # Detect if MacPorts is installed on this system; if so, return base path and version
execute_process(COMMAND which port RESULT_VARIABLE DETECT_MACPORTS OUTPUT_VARIABLE MACPORTS_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND which port RESULT_VARIABLE DETECT_MACPORTS OUTPUT_VARIABLE MACPORTS_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${DETECT_MACPORTS} EQUAL 0) if(${DETECT_MACPORTS} EQUAL 0)
@ -87,6 +88,7 @@ if(${DETECT_MACPORTS} EQUAL 0)
get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY) get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
execute_process(COMMAND port version RESULT_VARIABLE DETECT_MACPORTS_VERSION OUTPUT_VARIABLE MACPORTS_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND port version RESULT_VARIABLE DETECT_MACPORTS_VERSION OUTPUT_VARIABLE MACPORTS_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" MACPORTS_VERSION "${MACPORTS_VERSION}") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" MACPORTS_VERSION "${MACPORTS_VERSION}")
set(MACOS_PACKAGES_PREFIX ${MACPORTS_PREFIX})
endif() endif()
# Detect if Homebrew is installed on this system; if so, return base path and version # Detect if Homebrew is installed on this system; if so, return base path and version
@ -94,4 +96,5 @@ execute_process(COMMAND brew --prefix RESULT_VARIABLE DETECT_HOMEBREW OUTPUT_VAR
if(${DETECT_HOMEBREW} EQUAL 0) if(${DETECT_HOMEBREW} EQUAL 0)
execute_process(COMMAND brew --version RESULT_VARIABLE DETECT_HOMEBREW_VERSION OUTPUT_VARIABLE HOMEBREW_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND brew --version RESULT_VARIABLE DETECT_HOMEBREW_VERSION OUTPUT_VARIABLE HOMEBREW_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" HOMEBREW_VERSION "${HOMEBREW_VERSION}") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" HOMEBREW_VERSION "${HOMEBREW_VERSION}")
endif() set(MACOS_PACKAGES_PREFIX ${HOMEBREW_PREFIX})
endif()

View File

@ -1,13 +1,13 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2021-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
set(FPHSA_NAME_MISMATCHED ON) set(FPHSA_NAME_MISMATCHED ON)
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
find_library(CPUFEATURES_LIBRARIES find_library(CPUFEATURES_LIBRARIES
@ -18,13 +18,7 @@ find_library(CPUFEATURES_LIBRARIES
find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h
PATHS $ENV{CPUFEATURES_DIR}/include PATHS $ENV{CPUFEATURES_DIR}/include
$ENV{CPUFEATURES_DIR} $ENV{CPUFEATURES_DIR}
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
~/Library/Frameworks
/Library/Frameworks
/sw/include # Fink
/opt/local/include # MacPorts
/opt/csw/include # Blastwave
PATH_SUFFIXES cpu_features PATH_SUFFIXES cpu_features
) )

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# - Try to find GFlags # - Try to find GFlags
@ -26,7 +26,7 @@ if(NOT COMMAND feature_summary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
if(NOT GFLAGS_ROOT) if(NOT GFLAGS_ROOT)
@ -46,9 +46,8 @@ if(APPLE)
libgflags.dylib libgflags.dylib
PATHS PATHS
${GFLAGS_ROOT_USER_PROVIDED}/lib ${GFLAGS_ROOT_USER_PROVIDED}/lib
/usr/local/lib ${GNSSSDR_LIB_PATHS}
/opt/local/lib ${GNSSSDR_LIB_PATHS}/opt/gflags/lib
/opt/homebrew/opt/gflags/lib
) )
else() else()
find_path(GFlags_ROOT_DIR find_path(GFlags_ROOT_DIR
@ -68,10 +67,8 @@ if(GFlags_ROOT_DIR)
PATHS PATHS
${GFlags_ROOT_DIR}/src ${GFlags_ROOT_DIR}/src
${GFLAGS_ROOT_USER_PROVIDED}/include ${GFLAGS_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include ${GNSSSDR_INCLUDE_PATHS}/opt/gflags/include
/opt/local/include
/opt/homebrew/opt/gflags/include
) )
# Find the libraries # Find the libraries

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary) if(NOT COMMAND feature_summary)
@ -9,7 +9,7 @@ if(NOT COMMAND feature_summary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
if(NOT GFORTRAN_ROOT) if(NOT GFORTRAN_ROOT)

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# - Try to find the Google Glog library # - Try to find the Google Glog library
@ -24,14 +24,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
if(NOT DEFINED GLOG_ROOT) if(NOT DEFINED GLOG_ROOT)
set(GLOG_ROOT /usr /usr/local) set(GLOG_ROOT /usr /usr/local)
endif() endif()
@ -74,7 +74,7 @@ if(MSVC)
${PC_GLOG_INCLUDEDIR} ${PC_GLOG_INCLUDEDIR}
PATHS PATHS
${GLOG_ROOT}/src/windows ${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog PATH_SUFFIXES glog
) )
else() else()
# Linux/OS X builds # Linux/OS X builds
@ -82,11 +82,10 @@ else()
HINTS HINTS
${PC_GLOG_INCLUDEDIR} ${PC_GLOG_INCLUDEDIR}
PATHS PATHS
/usr/include/glog ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include/glog ${GNSSSDR_INCLUDE_PATHS}/opt/glog/include
/opt/local/include/glog # default location in Macports ${GLOG_ROOT}/include
/opt/homebrew/opt/glog/include/glog PATH_SUFFIXES glog
${GLOG_ROOT}/include/glog
) )
endif() endif()

View File

@ -1,31 +1,28 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2024-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary) if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
pkg_check_modules(PC_GMP "gmp") pkg_check_modules(PC_GMP "gmp")
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
set(GMP_DEFINITIONS ${PC_GMP_CFLAGS_OTHER}) set(GMP_DEFINITIONS ${PC_GMP_CFLAGS_OTHER})
find_path(GMP_INCLUDE_DIR find_path(GMP_INCLUDE_DIR
NAMES gmpxx.h NAMES gmpxx.h
HINTS ${PC_GMP_INCLUDEDIR} HINTS ${PC_GMP_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include PATHS ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/usr/include
/opt/local/include
) )
set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
@ -35,16 +32,12 @@ find_library(GMPXX_LIBRARY
NAMES gmpxx NAMES gmpxx
HINTS ${PC_GMP_LIBDIR} HINTS ${PC_GMP_LIBDIR}
PATHS ${GNSSSDR_LIB_PATHS} PATHS ${GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
) )
find_library(GMP_LIBRARY find_library(GMP_LIBRARY
NAMES gmp NAMES gmp
HINTS ${PC_GMP_LIBDIR} HINTS ${PC_GMP_LIBDIR}
PATHS ${GNSSSDR_LIB_PATHS} PATHS ${GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
) )
set(GMP_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY}) set(GMP_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY})

View File

@ -1,9 +1,13 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2011-2021 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2011-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
if(GNSSSIMULATOR_ROOT) if(GNSSSIMULATOR_ROOT)
set(GNSSSIMULATOR_ROOT_USER_DEFINED ${GNSSSIMULATOR_ROOT}) set(GNSSSIMULATOR_ROOT_USER_DEFINED ${GNSSSIMULATOR_ROOT})
else() else()
@ -25,7 +29,8 @@ find_program(SW_GENERATOR_BIN gnss_sim
${GNSSSIMULATOR_ROOT_USER_DEFINED} ${GNSSSIMULATOR_ROOT_USER_DEFINED}
/usr /usr
/usr/local /usr/local
/opt/local ${CMAKE_SYSTEM_PREFIX_PATH}
${CMAKE_INSTALL_FULL_BINDIR}
PATH_SUFFIXES bin PATH_SUFFIXES bin
ONLY_CMAKE_FIND_ROOT_PATH ONLY_CMAKE_FIND_ROOT_PATH
) )

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2022-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# - Find gnsstk library # - Find gnsstk library
@ -19,6 +19,10 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
if(NOT GNSSTK_ROOT) if(NOT GNSSTK_ROOT)
set(GNSSTK_ROOT_USER_DEFINED /usr/local) set(GNSSTK_ROOT_USER_DEFINED /usr/local)
else() else()
@ -35,17 +39,13 @@ unset(GNSSTK_INCLUDE_DIR CACHE)
unset(GNSSTK_USES_GPSTK_NAMESPACE CACHE) unset(GNSSTK_USES_GPSTK_NAMESPACE CACHE)
find_path(GNSSTK_INCLUDE_DIR gnsstk/Rinex3ObsBase.hpp find_path(GNSSTK_INCLUDE_DIR gnsstk/Rinex3ObsBase.hpp
PATHS ${GNSSTK_ROOT_USER_DEFINED}/include PATHS ${GNSSTK_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
set(GNSSTK_NAMES ${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_SHARED_LIBRARY_SUFFIX}) set(GNSSTK_NAMES ${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_SHARED_LIBRARY_SUFFIX})
if(NOT GNSSTK_INCLUDE_DIR) if(NOT GNSSTK_INCLUDE_DIR)
find_path(GNSSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp find_path(GNSSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
PATHS ${GNSSTK_ROOT_USER_DEFINED}/include PATHS ${GNSSTK_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
if(GNSSTK_INCLUDE_DIR) if(GNSSTK_INCLUDE_DIR)
set(GNSSTK_NAMES gpstk ${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}) set(GNSSTK_NAMES gpstk ${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
@ -56,12 +56,8 @@ endif()
include(GNUInstallDirs) include(GNUInstallDirs)
find_library(GNSSTK_LIBRARY NAMES ${GNSSTK_NAMES} find_library(GNSSTK_LIBRARY NAMES ${GNSSTK_NAMES}
PATHS ${GNSSTK_ROOT_USER_DEFINED}/lib PATHS ${GNSSTK_ROOT_USER_DEFINED}/${CMAKE_INSTALL_LIBDIR}
${GNSSTK_ROOT_USER_DEFINED}/${CMAKE_INSTALL_LIBDIR} ${GNSSSDR_LIB_PATHS}
/usr/local/lib
/usr/${CMAKE_INSTALL_LIBDIR}
/usr/local/${CMAKE_INSTALL_LIBDIR}
/opt/local/lib
) )
if(GNSSTK_LIBRARY AND GNSSTK_INCLUDE_DIR) if(GNSSTK_LIBRARY AND GNSSTK_INCLUDE_DIR)

View File

@ -1,18 +1,19 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2021-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
find_program(GNUPLOT_EXECUTABLE find_program(GNUPLOT_EXECUTABLE
NAMES NAMES
gnuplot gnuplot
pgnuplot pgnuplot
PATHS PATHS
/usr/bin ${GNSSSDR_BIN_PATHS}
/usr/local/bin
/opt/local/bin
ONLY_CMAKE_FIND_ROOT_PATH ONLY_CMAKE_FIND_ROOT_PATH
) )

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2011-2022 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2011-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
######################################################################## ########################################################################
@ -12,14 +12,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list # if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
@ -97,9 +97,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
NAMES ${INCFILE} NAMES ${INCFILE}
HINTS ${PC_INCDIR} HINTS ${PC_INCDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
# look for libs # look for libs
@ -107,8 +105,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
find_library(${LIBVAR_NAME}_${libname} find_library(${LIBVAR_NAME}_${libname}
NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION} NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION}
HINTS ${PC_LIBDIR} HINTS ${PC_LIBDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/${CMAKE_INSTALL_LIBDIR}
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS} ${GNSSSDR_LIB_PATHS}
) )
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}}) list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
@ -197,9 +194,7 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_373 find_file(GNURADIO_VERSION_GREATER_THAN_373
NAMES gnuradio/blocks/tsb_vector_sink_f.h NAMES gnuradio/blocks/tsb_vector_sink_f.h
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
if(GNURADIO_VERSION_GREATER_THAN_373) if(GNURADIO_VERSION_GREATER_THAN_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+") set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
@ -208,9 +203,7 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_38 find_file(GNURADIO_VERSION_GREATER_THAN_38
NAMES gnuradio/filter/mmse_resampler_cc.h NAMES gnuradio/filter/mmse_resampler_cc.h
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
if(GNURADIO_VERSION_GREATER_THAN_38) if(GNURADIO_VERSION_GREATER_THAN_38)
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+") set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
@ -278,9 +271,7 @@ if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
NAMES gnuradio/iio/api.h NAMES gnuradio/iio/api.h
HINTS ${PC_GNURADIO_IIO_INCLUDEDIR} HINTS ${PC_GNURADIO_IIO_INCLUDEDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
# look for libs # look for libs

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
@ -23,6 +23,10 @@ if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_GTEST gtest) pkg_check_modules(PC_GTEST gtest)
if(NOT GTEST_DIR) if(NOT GTEST_DIR)
@ -44,10 +48,11 @@ find_path(LIBGTEST_DEV_DIR
${GTEST_DIR_USER_PROVIDED}/googletest ${GTEST_DIR_USER_PROVIDED}/googletest
/usr/src/googletest/googletest /usr/src/googletest/googletest
/usr/src/gtest /usr/src/gtest
/usr/include/gtest ${GNSSSDR_INCLUDE_PATHS}/gtest
/usr/local/src/googletest/googletest ${GNSSSDR_INCLUDE_PATHS}/googletest
/opt/local/src/gtest-1.7.0 ${CMAKE_SYSTEM_PREFIX_PATH}/src/googletest/googletest
/opt/homebrew/opt/googletest/include/googletest/googletest ${CMAKE_SYSTEM_PREFIX_PATH}/src/gtest-1.7.0
${CMAKE_SYSTEM_PREFIX_PATH}/opt/googletest/include/googletest/googletest
) )
find_path(GTEST_INCLUDE_DIRS find_path(GTEST_INCLUDE_DIRS
@ -55,10 +60,9 @@ find_path(GTEST_INCLUDE_DIRS
HINTS ${PC_GTEST_INCLUDEDIR} HINTS ${PC_GTEST_INCLUDEDIR}
PATHS PATHS
${GTEST_DIR_USER_PROVIDED}/googletest/include ${GTEST_DIR_USER_PROVIDED}/googletest/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include ${CMAKE_SYSTEM_PREFIX_PATH}/src/gtest-1.7.0/include
/opt/local/src/gtest-1.7.0/include ${CMAKE_SYSTEM_PREFIX_PATH}/opt/googletest/include
/opt/homebrew/opt/googletest/include
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# Tries to find Gperftools. # Tries to find Gperftools.
@ -33,6 +33,10 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
if(NOT GPERFTOOLS_ROOT) if(NOT GPERFTOOLS_ROOT)
set(GPERFTOOLS_ROOT_USER_DEFINED /usr/local) set(GPERFTOOLS_ROOT_USER_DEFINED /usr/local)
else() else()
@ -56,41 +60,27 @@ find_library(GPERFTOOLS_TCMALLOC
NAMES tcmalloc NAMES tcmalloc
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64 ${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_library(GPERFTOOLS_PROFILER find_library(GPERFTOOLS_PROFILER
NAMES profiler NAMES profiler
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64 ${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
NAMES tcmalloc_and_profiler NAMES tcmalloc_and_profiler
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64 ${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_path(GPERFTOOLS_INCLUDE_DIR find_path(GPERFTOOLS_INCLUDE_DIR
NAMES gperftools/heap-profiler.h NAMES gperftools/heap-profiler.h
PATHS /usr/include PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/include
/usr/local/include ${GNSSSDR_INCLUDE_PATHS}
/opt/local/include
${GPERFTOOLS_ROOT_USER_DEFINED}/include
) )
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER}) set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})

View File

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

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -13,14 +13,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_IIO gnuradio-iio) pkg_check_modules(PC_IIO gnuradio-iio)
if(NOT GRIIO_ROOT) if(NOT GRIIO_ROOT)
@ -28,31 +28,31 @@ if(NOT GRIIO_ROOT)
else() else()
set(GRIIO_ROOT_USER_DEFINED ${GRIIO_ROOT}) set(GRIIO_ROOT_USER_DEFINED ${GRIIO_ROOT})
endif() endif()
if(DEFINED ENV{GRIIO_ROOT}) if(DEFINED ENV{GRIIO_ROOT})
set(GRIIO_ROOT_USER_DEFINED set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED} ${GRIIO_ROOT_USER_DEFINED}
$ENV{GRIIO_ROOT} $ENV{GRIIO_ROOT}
) )
endif() endif()
if(DEFINED ENV{IIO_DIR}) if(DEFINED ENV{IIO_DIR})
set(GRIIO_ROOT_USER_DEFINED set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED} ${GRIIO_ROOT_USER_DEFINED}
$ENV{IIO_DIR} $ENV{IIO_DIR}
) )
endif() endif()
set(GRIIO_ROOT_USER_DEFINED set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED} ${GRIIO_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
find_path(IIO_INCLUDE_DIRS find_path(IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h NAMES gnuradio/iio/api.h
HINTS ${PC_IIO_INCLUDEDIR} HINTS ${PC_IIO_INCLUDEDIR}
PATHS ${GRIIO_ROOT_USER_DEFINED}/include PATHS ${GRIIO_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
if(IIO_INCLUDE_DIRS) if(IIO_INCLUDE_DIRS)
@ -62,9 +62,7 @@ else()
NAMES iio/api.h NAMES iio/api.h
HINTS ${PC_IIO_INCLUDEDIR} HINTS ${PC_IIO_INCLUDEDIR}
PATHS ${GRIIO_ROOT_USER_DEFINED}/include PATHS ${GRIIO_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
set(GR_IIO_INCLUDE_HAS_GNURADIO FALSE) set(GR_IIO_INCLUDE_HAS_GNURADIO FALSE)
endif() endif()

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# Tries to find gr-limesdr. # Tries to find gr-limesdr.
@ -31,14 +31,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(GRLIMESDR_PKG QUIET gnuradio-limesdr) pkg_check_modules(GRLIMESDR_PKG QUIET gnuradio-limesdr)
if(NOT GRLIMESDR_ROOT) if(NOT GRLIMESDR_ROOT)
@ -61,9 +61,7 @@ find_path(GRLIMESDR_INCLUDE_DIR
${GRLIMESDR_PKG_INCLUDEDIR} ${GRLIMESDR_PKG_INCLUDEDIR}
PATHS PATHS
${GRLIMESDR_ROOT_USER_DEFINED}/include ${GRLIMESDR_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(GRLIMESDR_LIBRARIES find_library(GRLIMESDR_LIBRARIES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# Tries to find gr-osmosdr. # Tries to find gr-osmosdr.
@ -31,14 +31,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr) pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr)
if(NOT GROSMOSDR_ROOT) if(NOT GROSMOSDR_ROOT)
@ -61,9 +61,7 @@ find_path(GROSMOSDR_INCLUDE_DIR
${GROSMOSDR_PKG_INCLUDEDIR} ${GROSMOSDR_PKG_INCLUDEDIR}
PATHS PATHS
${GROSMOSDR_ROOT_USER_DEFINED}/include ${GROSMOSDR_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(GROSMOSDR_LIBRARIES find_library(GROSMOSDR_LIBRARIES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -13,14 +13,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_LIBAD9361 libad9361) pkg_check_modules(PC_LIBAD9361 libad9361)
if(NOT LIBAD9361_ROOT) if(NOT LIBAD9361_ROOT)
@ -43,9 +43,7 @@ find_path(LIBAD9361_INCLUDE_DIRS
NAMES ad9361.h NAMES ad9361.h
HINTS ${PC_LIBAD9361_INCLUDEDIR} HINTS ${PC_LIBAD9361_INCLUDEDIR}
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/include PATHS ${LIBAD9361_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(LIBAD9361_LIBRARIES find_library(LIBAD9361_LIBRARIES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -13,14 +13,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_LIBIIO libiio) pkg_check_modules(PC_LIBIIO libiio)
if(NOT LIBIIO_ROOT) if(NOT LIBIIO_ROOT)
@ -44,9 +44,7 @@ find_path(
NAMES iio.h NAMES iio.h
HINTS ${PC_LIBIIO_INCLUDEDIR} HINTS ${PC_LIBIIO_INCLUDEDIR}
PATHS ${LIBIIO_ROOT_USER_DEFINED}/include PATHS ${LIBIIO_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library( find_library(

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2022-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# Find the libunwind library # Find the libunwind library
@ -18,30 +18,22 @@ if(NOT COMMAND feature_summary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
find_path(LIBUNWIND_INCLUDE_DIR find_path(LIBUNWIND_INCLUDE_DIR
NAMES NAMES
libunwind.h libunwind.h
unwind.h unwind.h
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES include PATH_SUFFIXES include
PATHS "${LIBUNWIND_ROOT}/include" PATHS "${LIBUNWIND_ROOT}/include"
${GNSSSDR_INCLUDE_PATHS}
) )
find_library(LIBUNWIND_GENERIC_LIBRARY find_library(LIBUNWIND_GENERIC_LIBRARY
NAMES NAMES
libunwind libunwind
unwind unwind
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES lib lib64
PATHS PATHS
"${LIBUNWIND_ROOT}/lib" "${LIBUNWIND_ROOT}/lib"
"${LIBUNWIND_ROOT}/lib64" "${LIBUNWIND_ROOT}/lib64"
@ -75,12 +67,8 @@ if(LIBUNWIND_INCLUDE_DIR)
NAMES NAMES
libunwind-${LIBUNWIND_ARCH} libunwind-${LIBUNWIND_ARCH}
"unwind-${LIBUNWIND_ARCH}" "unwind-${LIBUNWIND_ARCH}"
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES lib lib64
PATHS "${LIBUNWIND_ROOT}" PATHS "${LIBUNWIND_ROOT}"
${GNSSSDR_LIB_PATHS}
) )
if(NOT LIBUNWIND_SPECIFIC_LIBRARY) if(NOT LIBUNWIND_SPECIFIC_LIBRARY)
message(STATUS " -- Failed to find unwind-${LIBUNWIND_ARCH}") message(STATUS " -- Failed to find unwind-${LIBUNWIND_ARCH}")

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# - Find Log4cpp # - Find Log4cpp
@ -19,14 +19,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_LOG4CPP log4cpp QUIET) pkg_check_modules(PC_LOG4CPP log4cpp QUIET)
if(LOG4CPP_INCLUDE_DIR) if(LOG4CPP_INCLUDE_DIR)
@ -52,9 +52,7 @@ set(LOG4CPP_ROOT_USER_PROVIDED
find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
${LOG4CPP_ROOT_USER_PROVIDED}/include ${LOG4CPP_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
${PC_LOG4CPP_INCLUDEDIR} ${PC_LOG4CPP_INCLUDEDIR}
) )
@ -77,8 +75,8 @@ find_library(LOG4CPP_LIBRARY
NAMES ${LOG4CPP_NAMES} NAMES ${LOG4CPP_NAMES}
HINTS ${PC_LOG4CPP_LIBDIR} HINTS ${PC_LOG4CPP_LIBDIR}
PATHS ${LOG4CPP_ROOT_USER_PROVIDED}/lib PATHS ${LOG4CPP_ROOT_USER_PROVIDED}/lib
${LOG4CPP_ROOT_USER_PROVIDED}/lib64 ${LOG4CPP_ROOT_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS} ${GNSSSDR_LIB_PATHS}
) )
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY) if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# FindMATIO # FindMATIO
@ -56,7 +56,7 @@ if(NOT COMMAND feature_summary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
if(NOT MATIO_ROOT) if(NOT MATIO_ROOT)
@ -76,9 +76,7 @@ find_path(MATIO_INCLUDE_DIR
NAMES matio.h NAMES matio.h
PATHS PATHS
${MATIO_ROOT_USER_DEFINED}/include ${MATIO_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include
DOC "The MATIO include directory" DOC "The MATIO include directory"
) )

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
if(DEFINED __INCLUDED_GNSSSDR_CMAKE_FIND_ORC) if(DEFINED __INCLUDED_GNSSSDR_CMAKE_FIND_ORC)
@ -13,14 +13,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22") pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
if(NOT ORC_ROOT) if(NOT ORC_ROOT)
@ -47,18 +47,14 @@ endif()
find_program(ORCC_EXECUTABLE orcc find_program(ORCC_EXECUTABLE orcc
HINTS ${ORC_ROOT_USER_PROVIDED}/bin HINTS ${ORC_ROOT_USER_PROVIDED}/bin
PATHS /usr/bin PATHS ${CMAKE_SYSTEM_PREFIX_PATH}/bin
/usr/local/bin
/opt/local/bin
) )
find_path(ORC_INCLUDE_DIR find_path(ORC_INCLUDE_DIR
NAMES orc/orc.h NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR} HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/include PATHS ${ORC_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
PATH_SUFFIXES orc-0.4 PATH_SUFFIXES orc-0.4
) )
@ -67,8 +63,6 @@ find_path(ORC_LIBRARY_DIR
HINTS ${PC_ORC_LIBDIR} HINTS ${PC_ORC_LIBDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNSSSDR_LIB_PATHS} ${GNSSSDR_LIB_PATHS}
) )
@ -76,8 +70,6 @@ find_library(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS} HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNSSSDR_LIB_PATHS} ${GNSSSDR_LIB_PATHS}
) )
@ -85,30 +77,9 @@ find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STA
HINTS ${PC_ORC_LIBRARY_DIRS} HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib PATHS ${ORC_ROOT}/lib
${ORC_ROOT}/lib64 ${ORC_ROOT}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${ORC_ROOT_USER_PROVIDED}/lib ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
if(PC_ORC_VERSION) if(PC_ORC_VERSION)

View File

@ -23,14 +23,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_PCAP libpcap QUIET) pkg_check_modules(PC_PCAP libpcap QUIET)
if(NOT PCAP_ROOT) if(NOT PCAP_ROOT)
@ -81,9 +81,7 @@ else()
${PC_PCAP_INCLUDEDIR} ${PC_PCAP_INCLUDEDIR}
PATHS PATHS
${PCAP_ROOT_USER_PROVIDED}/include ${PCAP_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(PCAP_LIBRARY find_library(PCAP_LIBRARY
NAMES NAMES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# Find the pugixml XML parsing library. # Find the pugixml XML parsing library.
@ -20,14 +20,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_PUGIXML pugixml QUIET) pkg_check_modules(PC_PUGIXML pugixml QUIET)
if(NOT PUGIXML_ROOT) if(NOT PUGIXML_ROOT)
@ -54,11 +54,9 @@ find_path(PUGIXML_INCLUDE_DIR
PATHS ${PUGIXML_ROOT_USER_DEFINED}/include PATHS ${PUGIXML_ROOT_USER_DEFINED}/include
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-${PC_PUGIXML_VERSION} ${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-${PC_PUGIXML_VERSION}
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-1.9 ${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-1.9
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include ${GNSSSDR_INCLUDE_PATHS}/pugixml-${PC_PUGIXML_VERSION}
/usr/local/include/pugixml-${PC_PUGIXML_VERSION} ${GNSSSDR_INCLUDE_PATHS}/pugixml-1.9
/usr/local/include/pugixml-1.9
/opt/local/include
) )
find_library(PUGIXML_LIBRARY find_library(PUGIXML_LIBRARY
@ -71,8 +69,8 @@ find_library(PUGIXML_LIBRARY
${PUGIXML_ROOT_USER_DEFINED}}/lib/pugixml-1.9 ${PUGIXML_ROOT_USER_DEFINED}}/lib/pugixml-1.9
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-1.9 ${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-1.9
${GNSSSDR_LIB_PATHS} ${GNSSSDR_LIB_PATHS}
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION} ${GNSSSDR_LIB_PATHS}/pugixml-${PC_PUGIXML_VERSION}
/usr/local/lib/pugixml-1.9 ${GNSSSDR_LIB_PATHS}/pugixml-1.9
) )
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found. # Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -17,6 +17,10 @@ if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_TELEORBIT teleorbit QUIET) pkg_check_modules(PC_TELEORBIT teleorbit QUIET)
if(NOT TELEORBIT_ROOT) if(NOT TELEORBIT_ROOT)
@ -40,9 +44,7 @@ find_path(TELEORBIT_INCLUDE_DIRS
HINTS ${PC_TELEORBIT_INCLUDEDIR} HINTS ${PC_TELEORBIT_INCLUDEDIR}
PATH_SUFFIXES gnuradio PATH_SUFFIXES gnuradio
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/include PATHS ${TELEORBIT_ROOT_USER_DEFINED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(TELEORBIT_LIBRARIES find_library(TELEORBIT_LIBRARIES
@ -50,11 +52,7 @@ find_library(TELEORBIT_LIBRARIES
HINTS ${PC_TELEORBIT_LIBDIR} HINTS ${PC_TELEORBIT_LIBDIR}
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/lib PATHS ${TELEORBIT_ROOT_USER_DEFINED}/lib
${TELEORBIT_ROOT_USER_DEFINED}/lib64 ${TELEORBIT_ROOT_USER_DEFINED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -16,14 +16,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_UHD uhd) pkg_check_modules(PC_UHD uhd)
if(NOT UHD_ROOT) if(NOT UHD_ROOT)
@ -54,9 +54,7 @@ find_path(UHD_INCLUDE_DIRS
NAMES uhd/config.hpp NAMES uhd/config.hpp
HINTS ${PC_UHD_INCLUDEDIR} HINTS ${PC_UHD_INCLUDEDIR}
PATHS ${UHD_ROOT_USER_PROVIDED}/include PATHS ${UHD_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(UHD_LIBRARIES find_library(UHD_LIBRARIES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -16,14 +16,14 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_VOLK volk QUIET) pkg_check_modules(PC_VOLK volk QUIET)
if(NOT VOLK_ROOT) if(NOT VOLK_ROOT)
@ -52,9 +52,7 @@ find_path(VOLK_INCLUDE_DIRS
NAMES volk/volk.h NAMES volk/volk.h
HINTS ${PC_VOLK_INCLUDEDIR} HINTS ${PC_VOLK_INCLUDEDIR}
PATHS ${VOLK_ROOT_USER_PROVIDED}/include PATHS ${VOLK_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(VOLK_LIBRARIES find_library(VOLK_LIBRARIES

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # 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 # SPDX-License-Identifier: BSD-3-Clause
# #
@ -21,6 +21,10 @@ if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr) pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
if(NOT VOLKGNSSSDR_ROOT) if(NOT VOLKGNSSSDR_ROOT)
@ -51,9 +55,7 @@ find_path(VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR} HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR}
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/include PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/include
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
) )
find_library(VOLK_GNSSSDR_LIBRARIES find_library(VOLK_GNSSSDR_LIBRARIES
@ -61,11 +63,7 @@ find_library(VOLK_GNSSSDR_LIBRARIES
HINTS ${PC_VOLK_GNSSSDR_LIBDIR} HINTS ${PC_VOLK_GNSSSDR_LIBDIR}
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib
${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib64 ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib64
/usr/lib ${GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2023 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2024-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -13,26 +13,26 @@ if(NOT COMMAND feature_summary)
include(FeatureSummary) include(FeatureSummary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND) if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig) include(FindPkgConfig)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrFindPaths)
endif()
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules(PC_ZEROMQ "libzmq") pkg_check_modules(PC_ZEROMQ "libzmq")
find_path(ZEROMQ_INCLUDE_DIRS find_path(ZEROMQ_INCLUDE_DIRS
NAMES zmq.hpp NAMES zmq.hpp
HINTS ${PC_ZEROMQ_INCLUDE_DIR} ${CMAKE_INSTALL_PREFIX}/include HINTS ${PC_ZEROMQ_INCLUDE_DIR}
PATHS /usr/local/include /usr/include /opt/local/include PATHS ${GNSSSDR_INCLUDE_PATHS}
) )
find_library(ZEROMQ_LIBRARIES find_library(ZEROMQ_LIBRARIES
NAMES zmq libzmq.so.5 ${ZEROMQ_LIBRARY_NAME} NAMES zmq libzmq.so.5 ${ZEROMQ_LIBRARY_NAME}
HINTS ${PC_ZEROMQ_LIBDIR} ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64 HINTS ${PC_ZEROMQ_LIBDIR}
PATHS ${GNSSSDR_LIB_PATHS} PATHS ${GNSSSDR_LIB_PATHS}
) )

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2024-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary) if(NOT COMMAND feature_summary)
@ -9,7 +9,7 @@ if(NOT COMMAND feature_summary)
endif() endif()
if(NOT GNSSSDR_LIB_PATHS) if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths) include(GnsssdrFindPaths)
endif() endif()
################################################################################ ################################################################################
@ -65,10 +65,7 @@ else()
find_path(GNUTLS_INCLUDE_DIR NAMES gnutls/gnutls.h find_path(GNUTLS_INCLUDE_DIR NAMES gnutls/gnutls.h
PATHS PATHS
/usr/include ${GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include # default location in Macports
/opt/homebrew/opt/gnutls/include/
${GNUTLS_ROOT_DIR}/include/ ${GNUTLS_ROOT_DIR}/include/
) )

View File

@ -0,0 +1,93 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(GNSSSDR_LIB_PATHS)
return()
endif()
if(NOT CMAKE_INSTALL_LIBDIR)
include(GNUInstallDirs)
endif()
set(GNSSSDR_LIB_PATHS
/usr/lib
/usr/lib64
/usr/lib/aarch64-linux-gnu
/usr/lib/alpha-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/hppa-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/i386-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/i386-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/local/lib
/usr/local/lib64
/usr/local/lib/i386
${CMAKE_INSTALL_FULL_LIBDIR}
${CMAKE_SYSTEM_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
)
set(GNSSSDR_INCLUDE_PATHS
/usr/include
/usr/local/include
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${CMAKE_SYSTEM_PREFIX_PATH}/include
${CMAKE_INSTALL_PREFIX}/include
)
set(GNSSSDR_BIN_PATHS
/usr/bin
/usr/local/bin
${CMAKE_INSTALL_PREFIX}/bin
${CMAKE_INSTALL_FULL_BINDIR}
${CMAKE_SYSTEM_PREFIX_PATH}/bin
/bin
/sbin
/usr/sbin
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(NOT MACOS_PACKAGES_PREFIX)
include(DetectMacOSVersion)
endif()
set(GNSSSDR_LIB_PATHS ${GNSSSDR_LIB_PATHS}
${MACOS_PACKAGES_PREFIX}/${CMAKE_INSTALL_LIBDIR}
${MACOS_PACKAGES_PREFIX}/lib
${MACOS_PACKAGES_PREFIX}/lib64
)
set(GNSSSDR_INCLUDE_PATHS ${GNSSSDR_INCLUDE_PATHS}
${MACOS_PACKAGES_PREFIX}/include
~/Library/Frameworks
/Library/Frameworks
/sw/include # Fink
/opt/csw/include # Blastwave
)
set(GNSSSDR_BIN_PATHS ${GNSSSDR_BIN_PATHS}
${MACOS_PACKAGES_PREFIX}/bin
)
endif()
list(REMOVE_DUPLICATES GNSSSDR_LIB_PATHS)
list(REMOVE_DUPLICATES GNSSSDR_INCLUDE_PATHS)

View File

@ -1,43 +0,0 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(GNSSSDR_LIB_PATHS)
return()
endif()
set(GNSSSDR_LIB_PATHS
/usr/lib
/usr/lib/aarch64-linux-gnu
/usr/lib/alpha-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/hppa-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/i386-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/i386-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib64
/usr/local/lib
/usr/local/lib/i386
/usr/local/lib64
/opt/local/lib
)

View File

@ -109,6 +109,7 @@ All notable changes to GNSS-SDR will be documented in this file.
place and, if not found, then it looks for GnuTLS as a fallback. place and, if not found, then it looks for GnuTLS as a fallback.
- Allow linking against Boost 1.87.0. - Allow linking against Boost 1.87.0.
- Replace the System V queues by boost::interprocess, improving portability. - Replace the System V queues by boost::interprocess, improving portability.
- Improve detection of Homebrew or Macports in macOS.
### Reliability ### Reliability

View File

@ -39,6 +39,13 @@ target_link_libraries(conditioner_adapters
Gnuradio::runtime Gnuradio::runtime
) )
if(GNURADIO_VERSION VERSION_LESS 3.9)
target_link_libraries(conditioner_adapters
PUBLIC
Boost::headers
)
endif()
if(ENABLE_GLOG_AND_GFLAGS) if(ENABLE_GLOG_AND_GFLAGS)
target_link_libraries(conditioner_adapters PRIVATE Gflags::gflags Glog::glog) target_link_libraries(conditioner_adapters PRIVATE Gflags::gflags Glog::glog)
target_compile_definitions(conditioner_adapters PRIVATE -DUSE_GLOG_AND_GFLAGS=1) target_compile_definitions(conditioner_adapters PRIVATE -DUSE_GLOG_AND_GFLAGS=1)

View File

@ -208,6 +208,7 @@ set(VERSION_INFO_MAJOR_VERSION 0)
set(VERSION_INFO_MINOR_VERSION 0) set(VERSION_INFO_MINOR_VERSION 0)
set(VERSION_INFO_MAINT_VERSION 19) set(VERSION_INFO_MAINT_VERSION 19)
include(VolkGnsssdrVersion) # setup version info include(VolkGnsssdrVersion) # setup version info
include(VolkGnsssdrFindPaths) # set VOLK_GNSSSDR_LIB_PATHS and VOLK_GNSSSDR_INCLUDE_PATHS

View File

@ -0,0 +1,26 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
set(MACOS_PACKAGES_PREFIX "")
# Detect if MacPorts is installed on this system; if so, return base path and version
execute_process(COMMAND which port RESULT_VARIABLE DETECT_MACPORTS OUTPUT_VARIABLE MACPORTS_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${DETECT_MACPORTS} EQUAL 0)
# "/opt/local/bin/port", so we get the parent directory
get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
# "/opt/local/bin", so we get the parent directory
get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
execute_process(COMMAND port version RESULT_VARIABLE DETECT_MACPORTS_VERSION OUTPUT_VARIABLE MACPORTS_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" MACPORTS_VERSION "${MACPORTS_VERSION}")
set(MACOS_PACKAGES_PREFIX ${MACPORTS_PREFIX})
endif()
# Detect if Homebrew is installed on this system; if so, return base path and version
execute_process(COMMAND brew --prefix RESULT_VARIABLE DETECT_HOMEBREW OUTPUT_VARIABLE HOMEBREW_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${DETECT_HOMEBREW} EQUAL 0)
execute_process(COMMAND brew --version RESULT_VARIABLE DETECT_HOMEBREW_VERSION OUTPUT_VARIABLE HOMEBREW_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" HOMEBREW_VERSION "${HOMEBREW_VERSION}")
set(MACOS_PACKAGES_PREFIX ${HOMEBREW_PREFIX})
endif()

View File

@ -1,55 +1,25 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2021-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
set(FPHSA_NAME_MISMATCHED ON) set(FPHSA_NAME_MISMATCHED ON)
if(NOT VOLK_GNSSSDR_LIB_PATHS)
include(VolkGnsssdrFindPaths)
endif()
find_library(CPUFEATURES_LIBRARIES find_library(CPUFEATURES_LIBRARIES
NAMES cpu_features NAMES cpu_features
PATHS /usr/lib PATHS $ENV{CPUFEATURES_DIR}/lib
/usr/lib64 ${VOLK_GNSSSDR_LIB_PATHS}
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/i386-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h
PATHS $ENV{CPUFEATURES_DIR}/include PATHS $ENV{CPUFEATURES_DIR}/include
$ENV{CPUFEATURES_DIR} $ENV{CPUFEATURES_DIR}
/usr/include ${VOLK_GNSSSDR_INCLUDE_PATHS}
/usr/local/include
~/Library/Frameworks
/Library/Frameworks
/sw/include # Fink
/opt/local/include # MacPorts
/opt/csw/include # Blastwave
PATH_SUFFIXES cpu_features PATH_SUFFIXES cpu_features
) )

View File

@ -1,13 +1,18 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# Copyright (C) 2015-2020 (see AUTHORS file for a list of contributors) # Copyright (C) 2015-2025 (see AUTHORS file for a list of contributors)
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
set(FPHSA_NAME_MISMATCHED ON) set(FPHSA_NAME_MISMATCHED ON)
include(FindPkgConfig) include(FindPkgConfig)
if(NOT VOLK_GNSSSDR_LIB_PATHS)
include(VolkGnsssdrFindPaths)
endif()
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22") pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
if(NOT ORC_ROOT) if(NOT ORC_ROOT)
@ -36,16 +41,14 @@ find_program(ORCC_EXECUTABLE orcc
HINTS ${ORC_ROOT_USER_PROVIDED}/bin HINTS ${ORC_ROOT_USER_PROVIDED}/bin
PATHS /usr/bin PATHS /usr/bin
/usr/local/bin /usr/local/bin
/opt/local/bin ${CMAKE_SYSTEM_PREFIX_PATH}/bin
) )
find_path(ORC_INCLUDE_DIR find_path(ORC_INCLUDE_DIR
NAMES orc/orc.h NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR} HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/include PATHS ${ORC_ROOT_USER_PROVIDED}/include
/usr/include ${VOLK_GNSSSDR_INCLUDE_PATHS}
/usr/local/include
/opt/local/include
PATH_SUFFIXES orc-0.4 PATH_SUFFIXES orc-0.4
) )
@ -54,86 +57,23 @@ find_path(ORC_LIBRARY_DIR
HINTS ${PC_ORC_LIBDIR} HINTS ${PC_ORC_LIBDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib ${VOLK_GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib64
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_library(ORC_LIB orc-0.4 find_library(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS} HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib ${VOLK_GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib64
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX} find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBRARY_DIRS} HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib PATHS ${ORC_ROOT}/lib
${ORC_ROOT}/lib64 ${ORC_ROOT}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${ORC_ROOT_USER_PROVIDED}/lib ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64 ${ORC_ROOT_USER_PROVIDED}/lib64
/usr/lib ${VOLK_GNSSSDR_LIB_PATHS}
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
) )
if(PC_ORC_VERSION) if(PC_ORC_VERSION)

View File

@ -0,0 +1,80 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(VOLK_GNSSSDR_LIB_PATHS)
return()
endif()
if(NOT CMAKE_INSTALL_LIBDIR)
include(GNUInstallDirs)
endif()
set(VOLK_GNSSSDR_LIB_PATHS
/usr/lib
/usr/lib64
/usr/lib/aarch64-linux-gnu
/usr/lib/alpha-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/hppa-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/i386-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/i386-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/local/lib
/usr/local/lib64
/usr/local/lib/i386
${CMAKE_INSTALL_FULL_LIBDIR}
${CMAKE_SYSTEM_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
)
set(VOLK_GNSSSDR_INCLUDE_PATHS
/usr/include
/usr/local/include
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${CMAKE_SYSTEM_PREFIX_PATH}/include
${CMAKE_INSTALL_PREFIX}/include
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(NOT MACOS_PACKAGES_PREFIX)
include(DetectMacOSPackaging)
endif()
set(VOLK_GNSSSDR_LIB_PATHS
${VOLK_GNSSSDR_LIB_PATHS}
${MACOS_PACKAGES_PREFIX}/${CMAKE_INSTALL_LIBDIR}
${MACOS_PACKAGES_PREFIX}/lib
${MACOS_PACKAGES_PREFIX}/lib64
)
set(VOLK_GNSSSDR_INCLUDE_PATHS ${VOLK_GNSSSDR_INCLUDE_PATHS}
${MACOS_PACKAGES_PREFIX}/include
~/Library/Frameworks
/Library/Frameworks
/sw/include # Fink
/opt/csw/include # Blastwave
)
endif()
list(REMOVE_DUPLICATES VOLK_GNSSSDR_LIB_PATHS)
list(REMOVE_DUPLICATES VOLK_GNSSSDR_INCLUDE_PATHS)

View File

@ -120,13 +120,8 @@ if(NOT VOLKGNSSSDR_FOUND)
) )
endif() endif()
find_program(GZIP find_program(GZIP gzip
gzip ${GNSSSDR_BIN_PATHS}
/bin
/usr/bin
/usr/local/bin
/opt/local/bin
/sbin
) )
if(NOT GZIP_NOTFOUND) if(NOT GZIP_NOTFOUND)

View File

@ -318,7 +318,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION} GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/gnss-sim SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/gnss-sim
BINARY_DIR ${GNSSSDR_BINARY_DIR}/gnss-sim BINARY_DIR ${GNSSSDR_BINARY_DIR}/gnss-sim
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR} ${TOOLCHAIN_ARG_GNSS_SIM} CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR} ${TOOLCHAIN_ARG_GNSS_SIM} -DBoost_DIR=${Boost_DIR}
BUILD_COMMAND ${GNSS_SIM_BUILD_COMMAND} BUILD_COMMAND ${GNSS_SIM_BUILD_COMMAND}
UPDATE_COMMAND "" UPDATE_COMMAND ""
PATCH_COMMAND "" PATCH_COMMAND ""

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2010-2025 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@ -140,11 +140,7 @@ install(TARGETS front-end-cal
) )
find_program(GZIP gzip find_program(GZIP gzip
/bin ${GNSSSDR_BIN_PATHS}
/usr/bin
/usr/local/bin
/opt/local/bin
/sbin
) )
if(NOT GZIP_NOTFOUND) if(NOT GZIP_NOTFOUND)

View File

@ -54,9 +54,7 @@ if(CMAKE_VERSION VERSION_LESS 3.5)
endif() endif()
find_program(UNCOMPRESS_EXECUTABLE uncompress find_program(UNCOMPRESS_EXECUTABLE uncompress
PATHS /bin PATHS ${GNSSSDR_BIN_PATHS}
/usr/bin
/usr/sbin
) )
if(TARGET Boost::iostreams AND TARGET Boost::serialization) if(TARGET Boost::iostreams AND TARGET Boost::serialization)