mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
Remove usage of uninitialized variables in CMake scripts
Remove all warnings emitted by cmake --warn-uninitialized ..
This commit is contained in:
parent
1656463d04
commit
299cb1a2ee
@ -846,6 +846,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(STRIP_VOLK_GNSSSDR_PROFILE "")
|
||||
if(ENABLE_PACKAGING)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=ON -DCMAKE_VERBOSE_MAKEFILE=ON")
|
||||
@ -1515,9 +1516,13 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
)
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(ARMADILLO_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
|
||||
else()
|
||||
set(ARMADILLO_TOOLCHAIN_FILE "")
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ENABLE_OWN_ARMADILLO)
|
||||
set(DARWIN_DISABLE_HDF5 -DDETECT_HDF5=false)
|
||||
else()
|
||||
set(DARWIN_DISABLE_HDF5 "")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
@ -2287,7 +2292,11 @@ if(DOXYGEN_FOUND)
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_DOT ${DOXYGEN_HAVE_DOT})
|
||||
if(TARGET Doxygen::dot)
|
||||
set(HAVE_DOT "YES")
|
||||
else()
|
||||
set(HAVE_DOT "NO")
|
||||
endif()
|
||||
endif()
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
|
||||
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir)
|
||||
|
@ -9,41 +9,50 @@
|
||||
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
|
||||
# framework, which causes a bug when the BeiDou constellation is enabled
|
||||
|
||||
if(NOT BLAS_ROOT)
|
||||
set(BLAS_ROOT_USER_DEFINED /usr/local/lib)
|
||||
else()
|
||||
set(BLAS_ROOT_USER_DEFINED ${BLAS_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{BLAS_ROOT})
|
||||
set(BLAS_ROOT_USER_DEFINED
|
||||
${BLAS_ROOT_USER_DEFINED}
|
||||
$ENV{BLAS_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library(BLAS_LIBRARIES
|
||||
libblas.dylib
|
||||
PATHS
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
${BLAS_ROOT}/lib
|
||||
$ENV{BLAS_ROOT}/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
libblas.dylib
|
||||
PATHS
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
)
|
||||
|
||||
if(BLAS_LIBRARIES)
|
||||
set(BLAS_FOUND TRUE)
|
||||
set(BLAS_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
find_library(LAPACK_LIBRARIES
|
||||
liblapack.dylib
|
||||
PATHS
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
${BLAS_ROOT}/lib
|
||||
$ENV{BLAS_ROOT}/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
liblapack.dylib
|
||||
PATHS
|
||||
${BLAS_ROOT_USER_DEFINED}
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
)
|
||||
|
||||
if(LAPACK_LIBRARIES)
|
||||
set(LAPACK_FOUND TRUE)
|
||||
set(LAPACK_FOUND TRUE)
|
||||
endif()
|
||||
|
@ -117,7 +117,9 @@ include(CheckCXXSourceCompiles)
|
||||
|
||||
cmake_push_check_state()
|
||||
|
||||
set(CMAKE_REQUIRED_QUIET ${FILESYSTEM_FIND_QUIETLY})
|
||||
if(FILESYSTEM_FIND_QUIETLY)
|
||||
set(CMAKE_REQUIRED_QUIET ${FILESYSTEM_FIND_QUIETLY})
|
||||
endif()
|
||||
|
||||
# All of our tests require C++17 or later
|
||||
set(OLD_CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
||||
|
@ -27,66 +27,74 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GFLAGS_ROOT)
|
||||
set(GFLAGS_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(GFLAGS_ROOT_USER_PROVIDED ${GFLAGS_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GFLAGS_ROOT})
|
||||
set(GFLAGS_ROOT_USER_PROVIDED
|
||||
${GFLAGS_ROOT_USER_PROVIDED}
|
||||
$ENV{GFLAGS_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_path(GFlags_ROOT_DIR
|
||||
libgflags.dylib
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
${GFLAGS_ROOT}/lib
|
||||
$ENV{GFLAGS_ROOT}/lib
|
||||
libgflags.dylib
|
||||
PATHS
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
else()
|
||||
find_path(GFlags_ROOT_DIR
|
||||
libgflags.so
|
||||
PATHS
|
||||
/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/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GFLAGS_ROOT}/lib
|
||||
$ENV{GFLAGS_ROOT}/lib
|
||||
${GFLAGS_ROOT}/lib64
|
||||
$ENV{GFLAGS_ROOT}/lib64
|
||||
libgflags.so
|
||||
PATHS
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/lib
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/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/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GFlags_ROOT_DIR)
|
||||
# We are testing only a couple of files in the include directories
|
||||
find_path(GFlags_INCLUDE_DIRS
|
||||
gflags/gflags.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GFlags_ROOT_DIR}/src
|
||||
${GFLAGS_ROOT}/include
|
||||
$ENV{GFLAGS_ROOT}/include
|
||||
gflags/gflags.h
|
||||
PATHS
|
||||
${GFlags_ROOT_DIR}/src
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
# Find the libraries
|
||||
@ -94,9 +102,9 @@ if(GFlags_ROOT_DIR)
|
||||
|
||||
find_library(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
|
||||
if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
|
||||
set(GFLAGS_GREATER_20 TRUE)
|
||||
set(GFLAGS_GREATER_20 TRUE)
|
||||
else()
|
||||
set(GFLAGS_GREATER_20 FALSE)
|
||||
set(GFLAGS_GREATER_20 FALSE)
|
||||
endif()
|
||||
message(STATUS "gflags library found at ${GFlags_lib}")
|
||||
set(GFlags_LIBS ${GFlags_lib})
|
||||
@ -111,6 +119,9 @@ include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)
|
||||
|
||||
if(GFLAGS_FOUND)
|
||||
if(NOT PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION "")
|
||||
endif()
|
||||
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
|
||||
unset(PACKAGE_VERSION)
|
||||
list(GET GFlags_LIBS 0 FIRST_DIR)
|
||||
|
@ -10,8 +10,20 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GFORTRAN_ROOT)
|
||||
set(GFORTRAN_ROOT_USER_DEFINED /usr/lib)
|
||||
else()
|
||||
set(GFORTRAN_ROOT_USER_DEFINED ${GFORTRAN_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GFORTRAN_ROOT})
|
||||
set(GFORTRAN_ROOT_USER_DEFINED
|
||||
${GFORTRAN_ROOT_USER_DEFINED}
|
||||
$ENV{GFORTRAN_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library(GFORTRAN NAMES gfortran
|
||||
PATHS /usr/lib
|
||||
PATHS ${GFORTRAN_ROOT_USER_DEFINED}
|
||||
/usr/lib64
|
||||
/usr/lib/gcc/x86_64-linux-gnu
|
||||
/usr/lib/gcc/i686-linux-gnu
|
||||
@ -217,8 +229,6 @@ find_library(GFORTRAN NAMES gfortran
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib/i386
|
||||
${GFORTRAN_ROOT}/lib
|
||||
$ENV{GFORTRAN_ROOT}/lib
|
||||
)
|
||||
|
||||
set_package_properties(GFORTRAN PROPERTIES
|
||||
|
@ -6,13 +6,28 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if(GNSSSIMULATOR_ROOT)
|
||||
set(GNSSSIMULATOR_ROOT_USER_DEFINED ${GNSSSIMULATOR_ROOT})
|
||||
else()
|
||||
set(GNSSSIMULATOR_ROOT_USER_DEFINED /usr/local/bin)
|
||||
endif()
|
||||
if(DEFINED ENV{GNSSSIMULATOR_ROOT})
|
||||
set(GNSSSIMULATOR_ROOT_USER_DEFINED
|
||||
${GNSSSIMULATOR_ROOT_USER_DEFINED}
|
||||
$ENV{GNSSSIMULATOR}
|
||||
)
|
||||
endif()
|
||||
set(GNSSSIMULATOR_ROOT_USER_DEFINED
|
||||
${GNSSSIMULATOR_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_program(SW_GENERATOR_BIN gnss_sim
|
||||
PATHS /usr/bin
|
||||
/usr/local/bin
|
||||
/opt/local/bin
|
||||
${CMAKE_INSTALL_PREFIX}/bin
|
||||
${GNSSSIMULATOR_ROOT}/bin
|
||||
$ENV{GNSSSIMULATOR_ROOT}/bin
|
||||
PATHS
|
||||
${GNSSSIMULATOR_ROOT_USER_DEFINED}
|
||||
/usr
|
||||
/usr/local
|
||||
/opt/local
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
|
||||
|
@ -27,14 +27,42 @@ set(GNURADIO_ALL_LIBRARIES "")
|
||||
set(GNURADIO_ALL_INCLUDE_DIRS "")
|
||||
|
||||
macro(LIST_CONTAINS var value)
|
||||
set(${var})
|
||||
foreach(value2 ${ARGN})
|
||||
if(${value} STREQUAL ${value2})
|
||||
set(${var} TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
set(${var})
|
||||
foreach(value2 ${ARGN})
|
||||
if(${value} STREQUAL ${value2})
|
||||
set(${var} TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if(NOT GNURADIO_INSTALL_PREFIX)
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED /usr)
|
||||
else()
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED ${GNURADIO_INSTALL_PREFIX})
|
||||
endif()
|
||||
if(GNURADIO_ROOT)
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
|
||||
${GNURADIO_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{GNURADIO_ROOT})
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
|
||||
$ENV{GNURADIO_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{GNURADIO_RUNTIME_DIR})
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
|
||||
$ENV{GNURADIO_RUNTIME_DIR}
|
||||
)
|
||||
endif()
|
||||
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
|
||||
if(NOT REQUIRED_MODULE)
|
||||
@ -60,14 +88,10 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
find_path(${INCVAR_NAME}
|
||||
NAMES ${INCFILE}
|
||||
HINTS ${PC_INCDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
)
|
||||
|
||||
# look for libs
|
||||
@ -75,7 +99,9 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
find_library(${LIBVAR_NAME}_${libname}
|
||||
NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION}
|
||||
HINTS ${PC_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -104,15 +130,6 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNURADIO_ROOT}/lib
|
||||
$ENV{GNURADIO_ROOT}/lib
|
||||
${GNURADIO_ROOT}/lib64
|
||||
$ENV{GNURADIO_ROOT}/lib64
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${GNURADIO_INSTALL_PREFIX}/lib
|
||||
${GNURADIO_INSTALL_PREFIX}/lib64
|
||||
)
|
||||
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
|
||||
endforeach()
|
||||
@ -198,15 +215,10 @@ endif()
|
||||
if(NOT PC_GNURADIO_RUNTIME_VERSION)
|
||||
find_file(GNURADIO_VERSION_GREATER_THAN_373
|
||||
NAMES gnuradio/blocks/tsb_vector_sink_f.h
|
||||
PATHS /usr/include
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
)
|
||||
if(GNURADIO_VERSION_GREATER_THAN_373)
|
||||
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
|
||||
@ -214,15 +226,10 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
|
||||
|
||||
find_file(GNURADIO_VERSION_GREATER_THAN_38
|
||||
NAMES gnuradio/filter/mmse_resampler_cc.h
|
||||
PATHS /usr/include
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
)
|
||||
if(GNURADIO_VERSION_GREATER_THAN_38)
|
||||
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
|
||||
@ -273,22 +280,19 @@ if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
|
||||
find_path(GNURADIO_IIO_INCLUDE_DIRS
|
||||
NAMES gnuradio/iio/api.h
|
||||
HINTS ${PC_GNURADIO_IIO_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_ROOT}/include
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
)
|
||||
|
||||
# look for libs
|
||||
find_library(GNURADIO_IIO_LIBRARIES
|
||||
NAMES gnuradio-iio gnuradio-iio-${GNURADIO_VERSION}
|
||||
HINTS ${PC_GNURADIO_IIO_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -317,15 +321,6 @@ if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNURADIO_ROOT}/lib
|
||||
$ENV{GNURADIO_ROOT}/lib
|
||||
${GNURADIO_ROOT}/lib64
|
||||
$ENV{GNURADIO_ROOT}/lib64
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${GNURADIO_INSTALL_PREFIX}/lib
|
||||
${GNURADIO_INSTALL_PREFIX}/lib64
|
||||
)
|
||||
|
||||
if(GNURADIO_IIO_LIBRARIES)
|
||||
|
@ -23,11 +23,23 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_GTEST gtest)
|
||||
|
||||
if(NOT GTEST_DIR)
|
||||
set(GTEST_DIR_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(GTEST_DIR_USER_PROVIDED ${GTEST_DIR})
|
||||
endif()
|
||||
if(DEFINED ENV{GTEST_DIR})
|
||||
set(GTEST_DIR_USER_PROVIDED
|
||||
${GTEST_DIR_USER_PROVIDED}
|
||||
$ENV{GTEST_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(LIBGTEST_DEV_DIR
|
||||
NAMES src/gtest-all.cc
|
||||
PATHS
|
||||
${GTEST_DIR}
|
||||
${GTEST_DIR}/googletest
|
||||
${GTEST_DIR_USER_PROVIDED}
|
||||
${GTEST_DIR_USER_PROVIDED}/googletest
|
||||
/usr/src/googletest/googletest
|
||||
/usr/src/gtest
|
||||
/usr/include/gtest
|
||||
@ -39,7 +51,7 @@ find_path(GTEST_INCLUDE_DIRS
|
||||
NAMES gtest/gtest.h
|
||||
HINTS ${PC_GTEST_INCLUDEDIR}
|
||||
PATHS
|
||||
${GTEST_DIR}/googletest/include
|
||||
${GTEST_DIR_USER_PROVIDED}/googletest/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/src/gtest-1.7.0/include
|
||||
|
@ -35,70 +35,76 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
find_library(GPERFTOOLS_TCMALLOC
|
||||
NAMES tcmalloc
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${Gperftools_ROOT_DIR}/lib
|
||||
${GPERFTOOLS_ROOT}/lib
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
if(NOT GPERFTOOLS_ROOT)
|
||||
set(GPERFTOOLS_ROOT_USER_DEFINED /usr/local)
|
||||
else()
|
||||
set(GPERFTOOLS_ROOT_USER_DEFINED ${GPERFTOOLS_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GPERFTOOLS_ROOT})
|
||||
set(GPERFTOOLS_ROOT_USER_DEFINED
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}
|
||||
$ENV{GPERFTOOLS_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(Gperftools_ROOT_DIR)
|
||||
set(GPERFTOOLS_ROOT_USER_DEFINED
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}
|
||||
${Gperftools_ROOT_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
find_library(GPERFTOOLS_TCMALLOC
|
||||
NAMES tcmalloc
|
||||
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(GPERFTOOLS_PROFILER
|
||||
NAMES profiler
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${Gperftools_ROOT_DIR}/lib
|
||||
${GPERFTOOLS_ROOT}/lib
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
NAMES profiler
|
||||
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
NAMES tcmalloc_and_profiler
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
${Gperftools_ROOT_DIR}/lib
|
||||
${GPERFTOOLS_ROOT}/lib
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
NAMES tcmalloc_and_profiler
|
||||
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_path(GPERFTOOLS_INCLUDE_DIR
|
||||
NAMES gperftools/heap-profiler.h
|
||||
PATHS /usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${Gperftools_ROOT_DIR}/include
|
||||
${GPERFTOOLS_ROOT}/include
|
||||
$ENV{GPERFTOOLS_ROOT}/include
|
||||
NAMES gperftools/heap-profiler.h
|
||||
PATHS /usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GPERFTOOLS_ROOT_USER_DEFINED}/include
|
||||
)
|
||||
|
||||
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
GPERFTOOLS
|
||||
DEFAULT_MSG
|
||||
GPERFTOOLS_LIBRARIES
|
||||
GPERFTOOLS_INCLUDE_DIR
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
|
||||
GPERFTOOLS
|
||||
DEFAULT_MSG
|
||||
GPERFTOOLS_LIBRARIES
|
||||
GPERFTOOLS_INCLUDE_DIR
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
)
|
||||
|
||||
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::tcmalloc)
|
||||
@ -137,8 +143,9 @@ set_package_properties(GPERFTOOLS PROPERTIES
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
GPERFTOOLS_LIBRARIES
|
||||
GPERFTOOLS_INCLUDE_DIR)
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
GPERFTOOLS_LIBRARIES
|
||||
GPERFTOOLS_INCLUDE_DIR
|
||||
)
|
||||
|
@ -21,26 +21,36 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GPSTK_ROOT)
|
||||
set(GPSTK_ROOT_USER_DEFINED /usr/local)
|
||||
else()
|
||||
set(GPSTK_ROOT_USER_DEFINED ${GPSTK_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GPSTK_ROOT})
|
||||
set(GPSTK_ROOT_USER_DEFINED
|
||||
${GPSTK_ROOT_USER_DEFINED}
|
||||
$ENV{GPSTK_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
|
||||
PATHS /usr/include
|
||||
PATHS ${GPSTK_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GPSTK_ROOT}/include
|
||||
$ENV{GPSTK_ROOT}/include
|
||||
)
|
||||
|
||||
set(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
|
||||
set(GPSTK_NAMES gpstk libgpstk)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GPSTK_ROOT_USER_DEFINED}/lib
|
||||
${GPSTK_ROOT_USER_DEFINED}/${CMAKE_INSTALL_LIBDIR}
|
||||
/usr/local/lib
|
||||
/usr/${CMAKE_INSTALL_LIBDIR}
|
||||
/usr/local/${CMAKE_INSTALL_LIBDIR}
|
||||
/opt/local/lib
|
||||
${GPSTK_ROOT}/${CMAKE_INSTALL_LIBDIR}
|
||||
$ENV{GPSTK_ROOT}/${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
# handle the QUIET and REQUIRED arguments and set GPSTK_FOUND to TRUE if
|
||||
|
@ -17,35 +17,49 @@
|
||||
|
||||
pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
|
||||
|
||||
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}
|
||||
)
|
||||
|
||||
find_path(
|
||||
GR_DBFCTTC_INCLUDE_DIRS
|
||||
NAMES dbfcttc/api.h
|
||||
HINTS ${PC_GR_DBFCTTC_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GRDBFCTTC_ROOT}/include
|
||||
$ENV{GRDBFCTTC_ROOT}/include
|
||||
$ENV{GR_DBFCTTC_DIR}/include
|
||||
)
|
||||
|
||||
find_library(
|
||||
GR_DBFCTTC_LIBRARIES
|
||||
NAMES gnuradio-dbfcttc
|
||||
HINTS ${PC_GR_DBFCTTC_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/lib
|
||||
${GRDBFCTTC_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${GRDBFCTTC_ROOT}/lib
|
||||
$ENV{GRDBFCTTC_ROOT}/lib
|
||||
${GRDBFCTTC_ROOT}/lib64
|
||||
$ENV{GRDBFCTTC_ROOT}/lib64
|
||||
$ENV{GR_DBFCTTC_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -17,35 +17,49 @@
|
||||
|
||||
pkg_check_modules(PC_GR_GN3S gr-gn3s)
|
||||
|
||||
if(NOT GRGN3S_ROOT)
|
||||
set(GRGN3S_ROOT_USER_DEFINED /usr/local)
|
||||
else()
|
||||
set(GRGN3S_ROOT_USER_DEFINED ${GRGN3S_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GRGN3S_ROOT})
|
||||
set(GRGN3S_ROOT_USER_DEFINED
|
||||
${GRGN3S_ROOT_USER_DEFINED}
|
||||
$ENV{GRGN3S_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{GR_GN3S_DIR})
|
||||
set(GRGN3S_ROOT_USER_DEFINED
|
||||
${GRGN3S_ROOT_USER_DEFINED}
|
||||
$ENV{GR_GN3S_DIR}
|
||||
)
|
||||
endif()
|
||||
set(GRGN3S_ROOT_USER_DEFINED
|
||||
${GRGN3S_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(
|
||||
GR_GN3S_INCLUDE_DIRS
|
||||
NAMES gn3s/gn3s_api.h
|
||||
HINTS ${PC_GR_GN3S_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GRGN3S_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GRGN3S_ROOT}/include
|
||||
$ENV{GRGN3S_ROOT}/include
|
||||
$ENV{GR_GN3S_DIR}/include
|
||||
)
|
||||
|
||||
find_library(
|
||||
GR_GN3S_LIBRARIES
|
||||
NAMES gr-gn3s
|
||||
HINTS ${PC_GR_GN3S_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GRGN3S_ROOT_USER_DEFINED}/lib
|
||||
${GRGN3S_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${GRGN3S_ROOT}/lib
|
||||
$ENV{GRGN3S_ROOT}/lib
|
||||
${GRGN3S_ROOT}/lib64
|
||||
$ENV{GRGN3S_ROOT}/lib64
|
||||
$ENV{GR_GN3S_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -17,16 +17,36 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_IIO gnuradio-iio)
|
||||
|
||||
if(NOT GRIIO_ROOT)
|
||||
set(GRIIO_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
set(GRIIO_ROOT_USER_DEFINED ${GRIIO_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GRIIO_ROOT})
|
||||
set(GRIIO_ROOT_USER_DEFINED
|
||||
${GRIIO_ROOT_USER_DEFINED}
|
||||
$ENV{GRIIO_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{IIO_DIR})
|
||||
set(GRIIO_ROOT_USER_DEFINED
|
||||
${GRIIO_ROOT_USER_DEFINED}
|
||||
$ENV{IIO_DIR}
|
||||
)
|
||||
endif()
|
||||
set(GRIIO_ROOT_USER_DEFINED
|
||||
${GRIIO_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
|
||||
find_path(IIO_INCLUDE_DIRS
|
||||
NAMES gnuradio/iio/api.h
|
||||
HINTS ${PC_IIO_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GRIIO_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GRIIO_ROOT}/include
|
||||
$ENV{GRIIO_ROOT}/include
|
||||
$ENV{IIO_DIR}/include
|
||||
)
|
||||
|
||||
if(IIO_INCLUDE_DIRS)
|
||||
@ -35,13 +55,10 @@ else()
|
||||
find_path(IIO_INCLUDE_DIRS
|
||||
NAMES iio/api.h
|
||||
HINTS ${PC_IIO_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${GRIIO_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GRIIO_ROOT}/include
|
||||
$ENV{GRIIO_ROOT}/include
|
||||
$ENV{IIO_DIR}/include
|
||||
)
|
||||
set(GR_IIO_INCLUDE_HAS_GNURADIO FALSE)
|
||||
endif()
|
||||
@ -49,7 +66,9 @@ endif()
|
||||
find_library(IIO_LIBRARIES
|
||||
NAMES gnuradio-iio
|
||||
HINTS ${PC_IIO_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${GRIIO_ROOT_USER_DEFINED}/lib
|
||||
${GRIIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -78,13 +97,6 @@ find_library(IIO_LIBRARIES
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${GRIIO_ROOT}/lib
|
||||
$ENV{GRIIO_ROOT}/lib
|
||||
${GRIIO_ROOT}/lib64
|
||||
$ENV{GRIIO_ROOT}/lib64
|
||||
$ENV{IIO_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -35,58 +35,68 @@ endif()
|
||||
|
||||
pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr)
|
||||
|
||||
if(NOT GROSMOSDR_ROOT)
|
||||
set(GROSMOSDR_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
set(GROSMOSDR_ROOT_USER_DEFINED ${GROSMOSDR_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{GROSMOSDR_ROOT})
|
||||
set(GROSMOSDR_ROOT_USER_DEFINED
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}
|
||||
$ENV{GROSMOSDR_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(GROSMOSDR_INCLUDE_DIR
|
||||
NAMES
|
||||
osmosdr/source.h
|
||||
osmosdr/api.h
|
||||
HINTS
|
||||
${GROSMOSDR_PKG_INCLUDEDIR}
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GROSMOSDR_ROOT}/include
|
||||
$ENV{GROSMOSDR_ROOT}/include
|
||||
NAMES
|
||||
osmosdr/source.h
|
||||
osmosdr/api.h
|
||||
HINTS
|
||||
${GROSMOSDR_PKG_INCLUDEDIR}
|
||||
PATHS
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
find_library(GROSMOSDR_LIBRARIES
|
||||
NAMES gnuradio-osmosdr
|
||||
HINTS
|
||||
${GROSMOSDR_PKG_LIBDIR}
|
||||
PATHS
|
||||
/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/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/riscv64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GROSMOSDR_ROOT}/lib
|
||||
$ENV{GROSMOSDR_ROOT}/lib
|
||||
${GROSMOSDR_ROOT}/lib64
|
||||
$ENV{GROSMOSDR_ROOT}/lib64
|
||||
NAMES
|
||||
gnuradio-osmosdr
|
||||
HINTS
|
||||
${GROSMOSDR_PKG_LIBDIR}
|
||||
PATHS
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}/lib
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}/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/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/riscv64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -17,22 +17,37 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_LIBAD9361 libad9361)
|
||||
|
||||
if(NOT LIBAD9361_ROOT)
|
||||
set(LIBAD9361_ROOT_USER_DEFINED /usr/local)
|
||||
else()
|
||||
set(LIBAD9361_ROOT_USER_DEFINED ${LIBAD9361_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{LIBAD9361_ROOT})
|
||||
set(LIBAD9361_ROOT_USER_DEFINED
|
||||
${LIBAD9361_ROOT_USER_DEFINED}
|
||||
$ENV{LIBAD9361_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(LIBAD9361_ROOT_USER_DEFINED
|
||||
${LIBAD9361_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(LIBAD9361_INCLUDE_DIRS
|
||||
NAMES ad9361.h
|
||||
HINTS ${PC_LIBAD9361_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${LIBAD9361_ROOT}/include
|
||||
$ENV{LIBAD9361_ROOT}/include
|
||||
$ENV{LIBAD9361_DIR}/include
|
||||
)
|
||||
|
||||
find_library(LIBAD9361_LIBRARIES
|
||||
NAMES ad9361
|
||||
HINTS ${PC_LIBAD9361_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/lib
|
||||
${LIBAD9361_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -62,13 +77,6 @@ find_library(LIBAD9361_LIBRARIES
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
/Library/Frameworks/ad9361.framework
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${LIBAD9361_ROOT}/lib
|
||||
$ENV{LIBAD9361_ROOT}/lib
|
||||
${LIBAD9361_ROOT}/lib64
|
||||
$ENV{LIBAD9361_ROOT}/lib64
|
||||
$ENV{LIBAD9361_DIR}/lib
|
||||
)
|
||||
|
||||
if(LIBAD9361_LIBRARIES AND APPLE)
|
||||
|
@ -17,24 +17,39 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_LIBIIO libiio)
|
||||
|
||||
if(NOT LIBIIO_ROOT)
|
||||
set(LIBIIO_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
set(LIBIIO_ROOT_USER_DEFINED ${LIBIIO_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{LIBIIO_ROOT})
|
||||
set(LIBIIO_ROOT_USER_DEFINED
|
||||
${LIBIIO_ROOT_USER_DEFINED}
|
||||
$ENV{LIBIIO_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(LIBIIO_ROOT_USER_DEFINED
|
||||
${LIBIIO_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(
|
||||
LIBIIO_INCLUDE_DIRS
|
||||
NAMES iio.h
|
||||
HINTS ${PC_LIBIIO_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${LIBIIO_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${LIBIIO_ROOT}/include
|
||||
$ENV{LIBIIO_ROOT}/include
|
||||
$ENV{LIBIIO_DIR}/include
|
||||
)
|
||||
|
||||
find_library(
|
||||
LIBIIO_LIBRARIES
|
||||
NAMES iio libiio.so.0
|
||||
HINTS ${PC_LIBIIO_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${LIBIIO_ROOT_USER_DEFINED}/lib
|
||||
${LIBIIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -64,13 +79,6 @@ find_library(
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
/Library/Frameworks/iio.framework/
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${LIBIIO_ROOT}/lib
|
||||
$ENV{LIBIIO_ROOT}/lib
|
||||
${LIBIIO_ROOT}/lib64
|
||||
$ENV{LIBIIO_ROOT}/lib64
|
||||
$ENV{LIBIIO_DIR}/lib
|
||||
)
|
||||
|
||||
if(LIBIIO_LIBRARIES AND APPLE)
|
||||
|
@ -28,13 +28,28 @@ if(LOG4CPP_INCLUDE_DIR)
|
||||
set(LOG4CPP_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
if(LOG4CPP_ROOT)
|
||||
set(LOG4CPP_ROOT_USER_PROVIDED ${LOG4CPP_ROOT})
|
||||
else()
|
||||
set(LOG4CPP_ROOT_USER_PROVIDED /usr)
|
||||
endif()
|
||||
if(DEFINED ENV{LOG4CPP_ROOT})
|
||||
set(LOG4CPP_ROOT_USER_PROVIDED
|
||||
${LOG4CPP_ROOT_USER_PROVIDED}
|
||||
$ENV{LOG4CPP_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(LOG4CPP_ROOT_USER_PROVIDED
|
||||
${LOG4CPP_ROOT_USER_PROVIDED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${LOG4CPP_ROOT}/include
|
||||
$ENV{LOG4CPP_ROOT}/include
|
||||
${PC_LOG4CPP_INCLUDEDIR}
|
||||
${LOG4CPP_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${PC_LOG4CPP_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(LOG4CPP_INCLUDE_DIR)
|
||||
@ -53,9 +68,11 @@ endif()
|
||||
|
||||
set(LOG4CPP_NAMES log4cpp)
|
||||
find_library(LOG4CPP_LIBRARY
|
||||
NAMES ${LOG4CPP_NAMES}
|
||||
HINTS ${PC_LOG4CPP_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
NAMES ${LOG4CPP_NAMES}
|
||||
HINTS ${PC_LOG4CPP_LIBDIR}
|
||||
PATHS ${LOG4CPP_ROOT_USER_PROVIDED}/lib
|
||||
${LOG4CPP_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -84,24 +101,18 @@ find_library(LOG4CPP_LIBRARY
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${LOG4CPP_ROOT}/lib
|
||||
$ENV{LOG4CPP_ROOT}/lib
|
||||
${LOG4CPP_ROOT}/lib64
|
||||
$ENV{LOG4CPP_ROOT}/lib64
|
||||
$ENV{GNURADIO_RUNTIME_DIR}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
|
||||
set(LOG4CPP_FOUND TRUE)
|
||||
set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_FOUND TRUE)
|
||||
set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
|
||||
else()
|
||||
set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
|
||||
set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
@ -141,7 +152,4 @@ if (LOG4CPP_FOUND AND NOT TARGET Log4cpp::log4cpp)
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
LOG4CPP_LIBRARIES
|
||||
LOG4CPP_INCLUDE_DIRS
|
||||
)
|
||||
mark_as_advanced(LOG4CPP_LIBRARIES LOG4CPP_INCLUDE_DIRS)
|
||||
|
@ -57,15 +57,26 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT MATIO_ROOT)
|
||||
set(MATIO_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
set(MATIO_ROOT_USER_DEFINED ${MATIO_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{MATIO_ROOT})
|
||||
set(MATIO_ROOT_USER_DEFINED
|
||||
${MATIO_ROOT_USER_DEFINED}
|
||||
$ENV{MATIO_ROOT}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Look for the header file.
|
||||
find_path(MATIO_INCLUDE_DIR
|
||||
NAMES matio.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${MATIO_ROOT}/include
|
||||
$ENV{MATIO_ROOT}/include
|
||||
${MATIO_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
DOC "The MATIO include directory"
|
||||
)
|
||||
|
||||
@ -73,6 +84,8 @@ find_path(MATIO_INCLUDE_DIR
|
||||
find_library(MATIO_LIBRARY
|
||||
NAMES matio
|
||||
PATHS
|
||||
${MATIO_ROOT_USER_DEFINED}/lib
|
||||
${MATIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
@ -99,10 +112,6 @@ find_library(MATIO_LIBRARY
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${MATIO_ROOT}/lib
|
||||
$ENV{MATIO_ROOT}/lib
|
||||
${MATIO_ROOT}/lib64
|
||||
$ENV{MATIO_ROOT}/lib64
|
||||
DOC "The MATIO library"
|
||||
)
|
||||
|
||||
|
@ -12,30 +12,51 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
|
||||
|
||||
if(NOT ORC_ROOT)
|
||||
set(ORC_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(ORC_ROOT_USER_PROVIDED ${ORC_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{ORC_ROOT})
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
$ENV{ORC_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
if(PC_ORC_TOOLSDIR)
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
${PC_ORC_TOOLSDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(ORCC_EXECUTABLE orcc
|
||||
HINTS ${PC_ORC_TOOLSDIR}
|
||||
HINTS ${ORC_ROOT_USER_PROVIDED}/bin
|
||||
PATHS /usr/bin
|
||||
/usr/local/bin
|
||||
/opt/local/bin
|
||||
${ORC_ROOT}/bin
|
||||
${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
|
||||
find_path(ORC_INCLUDE_DIR
|
||||
NAMES orc/orc.h
|
||||
HINTS ${PC_ORC_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${ORC_ROOT}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
PATH_SUFFIXES orc-0.4
|
||||
)
|
||||
|
||||
find_path(ORC_LIBRARY_DIR
|
||||
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -53,16 +74,12 @@ find_path(ORC_LIBRARY_DIR
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${ORC_ROOT}/lib
|
||||
$ENV{ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
)
|
||||
|
||||
if(PC_ORC_VERSION)
|
||||
|
@ -29,94 +29,107 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_PCAP libpcap QUIET)
|
||||
|
||||
if(EXISTS $ENV{PCAPDIR})
|
||||
find_path(PCAP_INCLUDE_DIR
|
||||
NAMES
|
||||
pcap/pcap.h
|
||||
pcap.h
|
||||
HINTS
|
||||
${PC_PCAP_INCLUDEDIR}
|
||||
PATHS
|
||||
$ENV{PCAPDIR}
|
||||
${PCAP_ROOT}/include
|
||||
$ENV{PCAP_ROOT}/include
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(PCAP_LIBRARY
|
||||
NAMES
|
||||
pcap
|
||||
HINTS
|
||||
${PC_PCAP_LIBDIR}
|
||||
PATHS
|
||||
$ENV{PCAPDIR}
|
||||
${PCAP_ROOT}/lib
|
||||
$ENV{PCAP_ROOT}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
if(NOT PCAP_ROOT)
|
||||
set(PCAP_ROOT_USER_PROVIDED /usr)
|
||||
else()
|
||||
find_path(PCAP_INCLUDE_DIR
|
||||
NAMES
|
||||
pcap/pcap.h
|
||||
pcap.h
|
||||
HINTS
|
||||
${PC_PCAP_INCLUDEDIR}
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${PCAP_ROOT}/include
|
||||
$ENV{PCAP_ROOT}/include
|
||||
)
|
||||
find_library(PCAP_LIBRARY
|
||||
NAMES
|
||||
pcap
|
||||
HINTS
|
||||
${PC_PCAP_LIBDIR}
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-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-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-linux-gnux32
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${PCAP_ROOT}/lib
|
||||
$ENV{PCAP_ROOT}/lib
|
||||
)
|
||||
set(PCAP_ROOT_USER_PROVIDED ${PCAP_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{PCAP_ROOT})
|
||||
set(PCAP_ROOT_USER_PROVIDED
|
||||
${PCAP_ROOT_USER_PROVIDED}
|
||||
$ENV{PCAP_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{PCAPDIR})
|
||||
set(PCAP_ROOT_USER_PROVIDED
|
||||
${PCAP_ROOT_USER_PROVIDED}
|
||||
$ENV{PCAPDIR})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{PCAPDIR})
|
||||
find_path(PCAP_INCLUDE_DIR
|
||||
NAMES
|
||||
pcap/pcap.h
|
||||
pcap.h
|
||||
HINTS
|
||||
${PC_PCAP_INCLUDEDIR}
|
||||
PATHS
|
||||
${PCAP_ROOT_USER_PROVIDED}
|
||||
${PCAP_ROOT_USER_PROVIDED}/include
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(PCAP_LIBRARY
|
||||
NAMES
|
||||
pcap
|
||||
HINTS
|
||||
${PC_PCAP_LIBDIR}
|
||||
PATHS
|
||||
${PCAP_ROOT_USER_PROVIDED}
|
||||
${PCAP_ROOT_USER_PROVIDED}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
else()
|
||||
find_path(PCAP_INCLUDE_DIR
|
||||
NAMES
|
||||
pcap/pcap.h
|
||||
pcap.h
|
||||
HINTS
|
||||
${PC_PCAP_INCLUDEDIR}
|
||||
PATHS
|
||||
${PCAP_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
find_library(PCAP_LIBRARY
|
||||
NAMES
|
||||
pcap
|
||||
HINTS
|
||||
${PC_PCAP_LIBDIR}
|
||||
PATHS
|
||||
${PCAP_ROOT_USER_PROVIDED}/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-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-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-linux-gnux32
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
set(PCAP_INCLUDE_DIRS ${PCAP_INCLUDE_DIR})
|
||||
set(PCAP_LIBRARIES ${PCAP_LIBRARY})
|
||||
|
||||
if(PCAP_INCLUDE_DIRS)
|
||||
message(STATUS "Pcap include dirs set to ${PCAP_INCLUDE_DIRS}")
|
||||
message(STATUS "Pcap include dirs set to ${PCAP_INCLUDE_DIRS}")
|
||||
else()
|
||||
message(STATUS "Pcap include dirs cannot be found.")
|
||||
message(STATUS "Pcap include dirs cannot be found.")
|
||||
endif()
|
||||
|
||||
if(PCAP_LIBRARIES)
|
||||
message(STATUS "Pcap library set to ${PCAP_LIBRARIES}")
|
||||
message(STATUS "Pcap library set to ${PCAP_LIBRARIES}")
|
||||
else()
|
||||
message(STATUS "Pcap library cannot be found.")
|
||||
message(STATUS "Pcap library cannot be found.")
|
||||
endif()
|
||||
|
||||
#Functions
|
||||
@ -170,7 +183,4 @@ if(PCAP_FOUND AND NOT TARGET Pcap::pcap)
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
PCAP_LIBRARIES
|
||||
PCAP_INCLUDE_DIRS
|
||||
)
|
||||
mark_as_advanced(PCAP_LIBRARIES PCAP_INCLUDE_DIRS)
|
||||
|
@ -24,27 +24,47 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_PUGIXML pugixml QUIET)
|
||||
|
||||
if(NOT PUGIXML_ROOT)
|
||||
set(PUGIXML_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
set(PUGIXML_ROOT_USER_DEFINED ${PUGIXML_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{PUGIXML_ROOT})
|
||||
set(PUGIXML_ROOT_USER_DEFINED
|
||||
${PUGIXML_ROOT_USER_DEFINED}
|
||||
$ENV{PUGIXML_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(PUGIXML_HOME)
|
||||
set(PUGIXML_ROOT_USER_DEFINED
|
||||
${PUGIXML_ROOT_USER_DEFINED}
|
||||
${PUGIXML_HOME}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(PUGIXML_INCLUDE_DIR
|
||||
NAMES pugixml.hpp
|
||||
HINTS ${PC_PUGIXML_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${PUGIXML_ROOT_USER_DEFINED}/include
|
||||
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-1.9
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/local/include/pugixml-${PC_PUGIXML_VERSION}
|
||||
/usr/local/include/pugixml-1.9
|
||||
/opt/local/include
|
||||
${PUGIXML_HOME}/include
|
||||
${PUGIXML_ROOT}/include
|
||||
$ENV{PUGIXML_ROOT}/include
|
||||
${PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
||||
$ENV{PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT}/include/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
|
||||
)
|
||||
|
||||
find_library(PUGIXML_LIBRARY
|
||||
NAMES pugixml
|
||||
HINTS ${PC_PUGIXML_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${PUGIXML_ROOT_USER_DEFINED}/lib
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib64
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT_USER_DEFINED}}/lib/pugixml-1.9
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-1.9
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
@ -73,19 +93,6 @@ find_library(PUGIXML_LIBRARY
|
||||
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||
/usr/local/lib/pugixml-1.9
|
||||
/opt/local/lib
|
||||
${PUGIXML_HOME}/lib
|
||||
${PUGIXML_ROOT}/lib
|
||||
$ENV{PUGIXML_ROOT}/lib
|
||||
${PUGIXML_ROOT}/lib64
|
||||
$ENV{PUGIXML_ROOT}/lib64
|
||||
${PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||
$ENV{PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||
$ENV{PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT}/lib/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
|
||||
${PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||
)
|
||||
|
||||
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
|
||||
|
@ -17,33 +17,41 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_TELEORBIT teleorbit QUIET)
|
||||
|
||||
if(NOT TELEORBIT_ROOT)
|
||||
set(TELEORBIT_ROOT_USER_DEFINED /usr/local)
|
||||
else()
|
||||
set(TELEORBIT_ROOT_USER_DEFINED ${TELEORBIT_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{TELEORBIT_ROOT})
|
||||
set(TELEORBIT_ROOT_USER_DEFINED
|
||||
${TELEORBIT_ROOT_USER_DEFINED}
|
||||
$ENV{TELEORBIT_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(TELEORBIT_ROOT_USER_DEFINED
|
||||
${TELEORBIT_ROOT_USER_DEFINED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(TELEORBIT_INCLUDE_DIRS
|
||||
NAMES teleorbit/api.h
|
||||
HINTS ${PC_TELEORBIT_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${TELEORBIT_ROOT}/include
|
||||
$ENV{TELEORBIT_ROOT}/include
|
||||
$ENV{TELEORBIT_DIR}/include
|
||||
)
|
||||
|
||||
find_library(TELEORBIT_LIBRARIES
|
||||
NAMES gnuradio-teleorbit
|
||||
HINTS ${PC_TELEORBIT_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/lib
|
||||
${TELEORBIT_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${TELEORBIT_ROOT}/lib
|
||||
$ENV{TELEORBIT_ROOT}/lib
|
||||
${TELEORBIT_ROOT}/lib64
|
||||
$ENV{TELEORBIT_ROOT}/lib64
|
||||
$ENV{TELEORBIT_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -20,22 +20,45 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_UHD uhd)
|
||||
|
||||
if(NOT UHD_ROOT)
|
||||
set(UHD_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(UHD_ROOT_USER_PROVIDED ${UHD_ROOT})
|
||||
endif()
|
||||
if(GNURADIO_INSTALL_PREFIX)
|
||||
set(UHD_ROOT_USER_PROVIDED
|
||||
${UHD_ROOT_USER_PROVIDED}
|
||||
${GNURADIO_INSTALL_PREFIX}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{UHD_ROOT})
|
||||
set(UHD_ROOT_USER_PROVIDED
|
||||
${UHD_ROOT_USER_PROVIDED}
|
||||
$ENV{UHD_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{UHD_DIR})
|
||||
set(UHD_ROOT_USER_PROVIDED
|
||||
${UHD_ROOT_USER_PROVIDED}
|
||||
$ENV{UHD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(UHD_INCLUDE_DIRS
|
||||
NAMES uhd/config.hpp
|
||||
HINTS ${PC_UHD_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${UHD_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${UHD_ROOT}/include
|
||||
$ENV{UHD_ROOT}/include
|
||||
$ENV{UHD_DIR}/include
|
||||
)
|
||||
|
||||
find_library(UHD_LIBRARIES
|
||||
NAMES uhd
|
||||
HINTS ${PC_UHD_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${UHD_ROOT_USER_PROVIDED}/lib
|
||||
${UHD_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -64,12 +87,6 @@ find_library(UHD_LIBRARIES
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNURADIO_INSTALL_PREFIX}/lib
|
||||
${UHD_ROOT}/lib
|
||||
$ENV{UHD_ROOT}/lib
|
||||
${UHD_ROOT}/lib64
|
||||
$ENV{UHD_ROOT}/lib64
|
||||
$ENV{UHD_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -20,22 +20,43 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_VOLK volk QUIET)
|
||||
|
||||
if(NOT VOLK_ROOT)
|
||||
set(VOLK_ROOT_USER_PROVIDED /usr)
|
||||
else()
|
||||
set(VOLK_ROOT_USER_PROVIDED ${VOLK_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{VOLK_ROOT})
|
||||
set(VOLK_ROOT_USER_PROVIDED
|
||||
${VOLK_ROOT_USER_PROVIDED}
|
||||
$ENV{VOLK_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{VOLK_DIR})
|
||||
set(VOLK_ROOT_USER_PROVIDED
|
||||
${VOLK_ROOT_USER_PROVIDED}
|
||||
$ENV{VOLK_DIR}
|
||||
)
|
||||
endif()
|
||||
set(VOLK_ROOT_USER_PROVIDED
|
||||
${VOLK_ROOT_USER_PROVIDED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
find_path(VOLK_INCLUDE_DIRS
|
||||
NAMES volk/volk.h
|
||||
HINTS ${PC_VOLK_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${VOLK_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${VOLK_ROOT}/include
|
||||
$ENV{VOLK_ROOT}/include
|
||||
$ENV{VOLK_DIR}/include
|
||||
)
|
||||
|
||||
find_library(VOLK_LIBRARIES
|
||||
NAMES volk
|
||||
HINTS ${PC_VOLK_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${VOLK_ROOT_USER_PROVIDED}/lib
|
||||
${VOLK_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -63,12 +84,6 @@ find_library(VOLK_LIBRARIES
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${VOLK_ROOT}/lib
|
||||
$ENV{VOLK_ROOT}/lib
|
||||
${VOLK_ROOT}/lib64
|
||||
$ENV{VOLK_ROOT}/lib64
|
||||
$ENV{VOLK_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -21,32 +21,49 @@ endif()
|
||||
|
||||
pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
|
||||
|
||||
if(NOT VOLKGNSSSDR_ROOT)
|
||||
set(VOLKGNSSSDR_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(VOLKGNSSSDR_ROOT_USER_PROVIDED ${VOLKGNSSSDR_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{VOLKGNSSSDR_ROOT})
|
||||
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
|
||||
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
|
||||
$ENV{VOLKGNSSSDR_ROOT}
|
||||
)
|
||||
endif()
|
||||
if(DEFINED ENV{VOLK_GNSSSDR_DIR})
|
||||
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
|
||||
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
|
||||
$ENV{VOLK_GNSSSDR_DIR}
|
||||
)
|
||||
endif()
|
||||
if(GNURADIO_INSTALL_PREFIX)
|
||||
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
|
||||
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
|
||||
${GNURADIO_INSTALL_PREFIX}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(VOLK_GNSSSDR_INCLUDE_DIRS
|
||||
NAMES volk_gnsssdr/volk_gnsssdr.h
|
||||
HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${VOLKGNSSSDR_ROOT}/include
|
||||
$ENV{VOLKGNSSSDR_ROOT}/include
|
||||
$ENV{VOLK_GNSSSDR_DIR}/include
|
||||
)
|
||||
|
||||
find_library(VOLK_GNSSSDR_LIBRARIES
|
||||
NAMES volk_gnsssdr
|
||||
HINTS ${PC_VOLK_GNSSSDR_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib
|
||||
${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNURADIO_INSTALL_PREFIX}/lib
|
||||
${VOLKGNSSSDR_ROOT}/lib
|
||||
$ENV{VOLKGNSSSDR_ROOT}/lib
|
||||
${VOLKGNSSSDR_ROOT}/lib64
|
||||
$ENV{VOLKGNSSSDR_ROOT}/lib64
|
||||
$ENV{VOLK_GNSSSDR_DIR}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -7,13 +7,13 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc)
|
||||
set(ACQUISITION_LIB_HEADERS fpga_acquisition.h)
|
||||
endif()
|
||||
set(ACQUISITION_LIB_HEADERS acq_conf.h)
|
||||
set(ACQUISITION_LIB_SOURCES acq_conf.cc)
|
||||
|
||||
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
|
||||
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
|
||||
if(ENABLE_FPGA)
|
||||
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} fpga_acquisition.cc)
|
||||
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} fpga_acquisition.h)
|
||||
endif()
|
||||
|
||||
list(SORT ACQUISITION_LIB_HEADERS)
|
||||
list(SORT ACQUISITION_LIB_SOURCES)
|
||||
|
@ -12,6 +12,9 @@
|
||||
# Project setup
|
||||
########################################################################
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type: None Debug Release RelWithDebInfo MinSizeRel")
|
||||
project(volk_gnsssdr)
|
||||
enable_language(CXX)
|
||||
@ -74,6 +77,7 @@ else()
|
||||
find_package(FILESYSTEM COMPONENTS Final Experimental)
|
||||
endif()
|
||||
|
||||
set(MY_CXX_FLAGS "")
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
@ -310,6 +314,9 @@ endif()
|
||||
# Setup the package config file
|
||||
########################################################################
|
||||
# set variables found in the pc.in file
|
||||
if(NOT LIB_SUFFIX)
|
||||
set(LIB_SUFFIX "")
|
||||
endif()
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
|
||||
|
@ -117,7 +117,9 @@ include(CheckCXXSourceCompiles)
|
||||
|
||||
cmake_push_check_state()
|
||||
|
||||
set(CMAKE_REQUIRED_QUIET ${FILESYSTEM_FIND_QUIETLY})
|
||||
if(FILESYSTEM_FIND_QUIETLY)
|
||||
set(CMAKE_REQUIRED_QUIET ${FILESYSTEM_FIND_QUIETLY})
|
||||
endif()
|
||||
|
||||
# All of our tests require C++17 or later
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
@ -11,30 +11,51 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
|
||||
|
||||
if(NOT ORC_ROOT)
|
||||
set(ORC_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
set(ORC_ROOT_USER_PROVIDED ${ORC_ROOT})
|
||||
endif()
|
||||
if(DEFINED ENV{ORC_ROOT})
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
$ENV{ORC_ROOT}
|
||||
)
|
||||
endif()
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
if(PC_ORC_TOOLSDIR)
|
||||
set(ORC_ROOT_USER_PROVIDED
|
||||
${ORC_ROOT_USER_PROVIDED}
|
||||
${PC_ORC_TOOLSDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(ORCC_EXECUTABLE orcc
|
||||
HINTS ${PC_ORC_TOOLSDIR}
|
||||
HINTS ${ORC_ROOT_USER_PROVIDED}/bin
|
||||
PATHS /usr/bin
|
||||
/usr/local/bin
|
||||
/opt/local/bin
|
||||
${ORC_ROOT}/bin
|
||||
${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
|
||||
find_path(ORC_INCLUDE_DIR
|
||||
NAMES orc/orc.h
|
||||
HINTS ${PC_ORC_INCLUDEDIR}
|
||||
PATHS /usr/include
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${ORC_ROOT}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
PATH_SUFFIXES orc-0.4
|
||||
)
|
||||
|
||||
find_path(ORC_LIBRARY_DIR
|
||||
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS /usr/lib
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
@ -52,22 +73,19 @@ find_path(ORC_LIBRARY_DIR
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${ORC_ROOT}/lib
|
||||
$ENV{ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
)
|
||||
|
||||
list(APPEND ORC_LIBRARY
|
||||
${ORC_LIB}
|
||||
)
|
||||
if(PC_ORC_VERSION)
|
||||
set(ORC_VERSION ${PC_ORC_VERSION})
|
||||
endif()
|
||||
|
||||
list(APPEND ORC_LIBRARY ${ORC_LIB})
|
||||
|
||||
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
|
||||
set(ORC_LIBRARIES ${ORC_LIBRARY})
|
||||
|
@ -145,6 +145,9 @@ function(VOLK_ADD_TEST test_name executable_name)
|
||||
string(REPLACE ";" " " VOLK_TEST_ARGS "${VOLK_TEST_ARGS}")
|
||||
|
||||
#finally: append the test name to execute
|
||||
if(NOT CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR "")
|
||||
endif()
|
||||
file(APPEND ${sh_file} "${CMAKE_CROSSCOMPILING_EMULATOR} ${executable_name} ${VOLK_TEST_ARGS}\n")
|
||||
|
||||
#make the shell file executable
|
||||
|
@ -79,6 +79,9 @@ endif()
|
||||
########################################################################
|
||||
# determine passing architectures based on compile flag tests
|
||||
########################################################################
|
||||
if(NOT PYTHON_DASH_B)
|
||||
set(PYTHON_DASH_B "")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
|
||||
${PROJECT_SOURCE_DIR}/gen/volk_gnsssdr_compile_utils.py
|
||||
@ -405,6 +408,9 @@ else()
|
||||
OUTPUT_VARIABLE cmake_c_compiler_version
|
||||
)
|
||||
endif()
|
||||
if(NOT GRCBTU)
|
||||
set(GRCBTU "")
|
||||
endif()
|
||||
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n")
|
||||
|
||||
foreach(machine_name ${available_machines})
|
||||
|
@ -7,17 +7,11 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
set(OBSERVABLES_LIB_HEADERS ${OBSERVABLES_LIB_HEADERS} obs_conf.h)
|
||||
set(OBSERVABLES_LIB_SOURCES ${OBSERVABLES_LIB_SOURCES} obs_conf.cc)
|
||||
|
||||
list(SORT OBSERVABLES_LIB_HEADERS)
|
||||
list(SORT OBSERVABLES_LIB_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${OBSERVABLES_LIB_HEADERS})
|
||||
source_group(Headers FILES obs_conf.h)
|
||||
|
||||
add_library(observables_libs
|
||||
${OBSERVABLES_LIB_SOURCES}
|
||||
${OBSERVABLES_LIB_HEADERS}
|
||||
obs_conf.cc
|
||||
obs_conf.h
|
||||
)
|
||||
|
||||
target_link_libraries(observables_libs
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
|
||||
# Optional drivers
|
||||
set(OPT_DRIVER_SOURCES "")
|
||||
set(OPT_DRIVER_HEADERS "")
|
||||
|
||||
if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
||||
|
@ -7,10 +7,11 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
|
||||
set(OPT_DRIVER_SOURCES "")
|
||||
set(OPT_DRIVER_HEADERS "")
|
||||
if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
|
||||
set(OPT_DRIVER_SOURCES gr_complex_ip_packet_source.cc)
|
||||
set(OPT_DRIVER_HEADERS gr_complex_ip_packet_source.h)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES "")
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS "")
|
||||
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
|
||||
|
@ -7,14 +7,13 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
|
||||
set(OPT_TRACKING_ADAPTERS_SOURCES "")
|
||||
set(OPT_TRACKING_ADAPTERS_HEADERS "")
|
||||
if(ENABLE_CUDA)
|
||||
set(OPT_TRACKING_ADAPTERS_SOURCES
|
||||
${OPT_TRACKING_ADAPTERS_SOURCES}
|
||||
gps_l1_ca_dll_pll_tracking_gpu.cc
|
||||
)
|
||||
set(OPT_TRACKING_ADAPTERS_HEADERS
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
gps_l1_ca_dll_pll_tracking_gpu.h
|
||||
)
|
||||
endif()
|
||||
|
@ -7,13 +7,14 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
set(OPT_TRACKING_BLOCKS_SOURCES "")
|
||||
set(OPT_TRACKING_BLOCKS_HEADERS "")
|
||||
|
||||
if(ENABLE_CUDA)
|
||||
set(OPT_TRACKING_BLOCKS_SOURCES
|
||||
${OPT_TRACKING_BLOCKS_SOURCES}
|
||||
gps_l1_ca_dll_pll_tracking_gpu_cc.cc
|
||||
)
|
||||
set(OPT_TRACKING_BLOCKS_HEADERS
|
||||
${OPT_TRACKING_BLOCKS_HEADERS}
|
||||
gps_l1_ca_dll_pll_tracking_gpu_cc.h
|
||||
)
|
||||
endif()
|
||||
|
@ -42,7 +42,8 @@ set(TRACKING_LIB_HEADERS
|
||||
exponential_smoother.h
|
||||
)
|
||||
|
||||
|
||||
set(OPT_TRACKING_LIBRARIES "")
|
||||
set(OPT_TRACKING_INCLUDES "")
|
||||
if(ENABLE_CUDA)
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} cuda_multicorrelator.cu)
|
||||
|
@ -16,6 +16,7 @@ set(SUPL_SOURCES
|
||||
supl.c
|
||||
)
|
||||
|
||||
set(MY_C_FLAGS "")
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MY_C_FLAGS "${MY_C_FLAGS} -Wno-parentheses-equality")
|
||||
|
@ -586,6 +586,12 @@ endif()
|
||||
function(add_system_test executable)
|
||||
## Please call this function with variables OPT_INCLUDES_ and OPT_LIBS_
|
||||
## already defined.
|
||||
if(NOT OPT_INCLUDES_)
|
||||
set(OPT_INCLUDES_ "")
|
||||
endif()
|
||||
if(NOT OPT_LIBS_)
|
||||
set(OPT_LIBS_ "")
|
||||
endif()
|
||||
set(SYSTEM_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/${executable}.cc)
|
||||
# Ensure that executable is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
@ -602,7 +608,7 @@ function(add_system_test executable)
|
||||
target_link_libraries(${executable} PRIVATE Boost::filesystem Boost::system)
|
||||
endif()
|
||||
|
||||
target_include_directories(${executable} PUBLIC ${OPT_INCLUDES_} ${CMAKE_SOURCES_DIR}/src/algorithms/libs)
|
||||
target_include_directories(${executable} PUBLIC ${OPT_INCLUDES_} ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
|
||||
target_link_libraries(${executable} PUBLIC ${OPT_LIBS_} algorithms_libs)
|
||||
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
|
Loading…
Reference in New Issue
Block a user