mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-05 02:07:02 +00:00
Make use of ORC if available
This commit is contained in:
parent
71d5da84fb
commit
815a910619
@ -970,11 +970,23 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
else()
|
||||
set(VOLK_GNSSSDR_COMPILER -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
|
||||
endif()
|
||||
|
||||
find_package(ORC)
|
||||
set_package_properties(ORC PROPERTIES
|
||||
PURPOSE "Used by volk_gnsssdr."
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(ORC_FOUND)
|
||||
set(ORC_ENABLED ON)
|
||||
else()
|
||||
set(ORC_ENABLED OFF)
|
||||
endif()
|
||||
|
||||
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
||||
-DENABLE_STATIC_LIBS=ON
|
||||
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
||||
-DENABLE_ORC=OFF
|
||||
-DENABLE_ORC=${ORC_ENABLED}
|
||||
${STRIP_VOLK_GNSSSDR_PROFILE}
|
||||
${USE_THIS_PYTHON}
|
||||
)
|
||||
@ -1017,11 +1029,6 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
||||
)
|
||||
endif()
|
||||
find_package(ORC)
|
||||
set_package_properties(ORC PROPERTIES
|
||||
PURPOSE "Used by volk_gnsssdr."
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
set(ORC_LIBRARIES "")
|
||||
|
@ -38,8 +38,9 @@ find_path(ORC_INCLUDE_DIR
|
||||
PATHS /usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${ORC_ROOT}/include/orc-0.4
|
||||
${CMAKE_INSTALL_PREFIX}/include/orc-0.4
|
||||
${ORC_ROOT}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
PATH_SUFFIXES orc-0.4
|
||||
)
|
||||
|
||||
find_path(ORC_LIBRARY_DIR
|
||||
|
@ -16,45 +16,62 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
find_package(PkgConfig)
|
||||
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
|
||||
|
||||
find_program(ORCC_EXECUTABLE orcc
|
||||
HINTS ${PC_ORC_TOOLSDIR}
|
||||
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/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
|
||||
find_path(ORC_INCLUDE_DIR
|
||||
NAMES orc/orc.h
|
||||
HINTS ${PC_ORC_INCLUDEDIR}
|
||||
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4
|
||||
PATHS /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}
|
||||
/usr/local/lib
|
||||
/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/lib64
|
||||
/usr/lib
|
||||
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
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/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/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}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
list(APPEND ORC_LIBRARY
|
||||
${ORC_LIB}
|
||||
|
Loading…
x
Reference in New Issue
Block a user