From a1238a3c73b61ab34cd9e0d551c637732ad56af6 Mon Sep 17 00:00:00 2001 From: Hazen Babcock Date: Sun, 10 Nov 2024 16:52:06 -0500 Subject: [PATCH 1/3] to includes. --- DeviceAdapters/Aravis/AravisCamera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeviceAdapters/Aravis/AravisCamera.cpp b/DeviceAdapters/Aravis/AravisCamera.cpp index 7c740b3d3..4c22418d2 100644 --- a/DeviceAdapters/Aravis/AravisCamera.cpp +++ b/DeviceAdapters/Aravis/AravisCamera.cpp @@ -32,7 +32,7 @@ #include #include #include - +#include std::vector supportedPixelFormats = { "Mono8", From 4029395d2efd84a283f5f53a15a97eadacadc664 Mon Sep 17 00:00:00 2001 From: Hazen Babcock Date: Sun, 10 Nov 2024 16:52:59 -0500 Subject: [PATCH 2/3] Use pkgconfig to find Aravis, currently version 0.10 only. --- DeviceAdapters/Aravis/Makefile.am | 14 +++++-------- DeviceAdapters/configure.ac | 34 ++++++++++++++++++++++++------- m4/mm_libs.m4 | 15 ++++++++++++++ 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/DeviceAdapters/Aravis/Makefile.am b/DeviceAdapters/Aravis/Makefile.am index e722b1372..f645c0583 100644 --- a/DeviceAdapters/Aravis/Makefile.am +++ b/DeviceAdapters/Aravis/Makefile.am @@ -1,14 +1,10 @@ -AM_CXXFLAGS=$(MMDEVAPI_CXXFLAGS) - -# Linux, use output from from pkg-config (aravis-0.10). -ARAVISCPPFLAGS = -I/usr/local/include/aravis-0.10 -I/usr/include/libxml2 -I/usr/include/libusb-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -ARAVISLDFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/lib/x86_64-linux-gnu,-L/usr/local/lib/x86_64-linux-gnu -ARAVISLDLIBS = -laravis-0.10 -lgio-2.0 -lgobject-2.0 -lglib-2.0 +AM_CPPFLAGS = $(ARAVIS_CPPFLAGS) +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(ARAVIS_CFLAGS) +AM_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(ARAVIS_LDFLAGS) deviceadapter_LTLIBRARIES=libmmgr_dal_AravisCamera.la + libmmgr_dal_AravisCamera_la_SOURCES=AravisCamera.cpp AravisCamera.h -libmmgr_dal_AravisCamera_la_CPPFLAGS=$(ARAVISCPPFLAGS) -libmmgr_dal_AravisCamera_la_LIBADD=$(MMDEVAPI_LIBADD) $(ARAVISLDLIBS) -libmmgr_dal_AravisCamera_la_LDFLAGS=$(MMDEVAPI_LDFLAGS) $(ARAVISLDLIBS) $(ARAVISLDFLAGS) +libmmgr_dal_AravisCamera_la_LIBADD=$(MMDEVAPI_LIBADD) $(ARAVIS_LIBS) diff --git a/DeviceAdapters/configure.ac b/DeviceAdapters/configure.ac index af0e239db..b60e8fd28 100644 --- a/DeviceAdapters/configure.ac +++ b/DeviceAdapters/configure.ac @@ -307,13 +307,15 @@ else fi # Aravis (v0.10). -AC_MSG_CHECKING(for Aravis_Linux) -AM_CONDITIONAL([BUILD_ARAVIS_LINUX],[test -f "/usr/local/include/aravis-0.10/arv.h"]) -if test -f "/usr/local/include/aravis-0.10/arv.h"; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi +#AC_MSG_CHECKING(for Aravis_Linux) +#AM_CONDITIONAL([BUILD_ARAVIS_LINUX],[test -f "/usr/local/include/aravis-0.10/arv.h"]) +#if test -f "/usr/local/include/aravis-0.10/arv.h"; then +# AC_MSG_RESULT([found]) +#else +# AC_MSG_RESULT([not found]) +#fi + + # BaslerPylon AC_MSG_CHECKING(for Basler_Linux) @@ -364,6 +366,23 @@ fi AC_SUBST(LIBITC18) +# Aravis SDK +MM_ARG_WITH_OPTIONAL_LIB([Aravis], [aravis], [ARAVIS]) +AS_IF([test "x$want_aravis" != xno], +[ + MM_LIB_ARAVIS([$ARAVIS_PREFIX], + [use_aravis=yes], + [ + use_aravis=no + AS_IF([test "x$want_aravis" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([aravis], [Aravis])]) + ]) +], +[use_aravis=no]) + +AM_CONDITIONAL([BUILD_ARAVIS_LINUX], [test "x$use_aravis" = xyes]) + + # MessagePack MM_ARG_WITH_OPTIONAL_LIB([MessagePack], [msgpack], [MSGPACK]) AS_IF([test "x$want_msgpack" != xno], @@ -430,6 +449,7 @@ AS_IF([test "x$want_vimba_x" != xno], AM_CONDITIONAL([BUILD_ALLIED_VISION_CAMERA], [test "x$use_vimba_x" = xyes]) + # Zaber Motion Library (hack: only support 3rdpartypublic copy currently) zml_version="3.4.4" zml_so_version="3.4" diff --git a/m4/mm_libs.m4 b/m4/mm_libs.m4 index 603a2aa14..5a91f8979 100644 --- a/m4/mm_libs.m4 +++ b/m4/mm_libs.m4 @@ -66,6 +66,21 @@ AC_DEFUN([MM_LIB_HIDAPI], [ ]) +# Check for Aravis library +# +# MM_LIB_ARAVIS([aravis prefix], [action-if-found], [action-if-not-found]) +# +# Defines precious variables ARAVIS_CPPFLAGS, ARAVIS_CFLAGS, ARAVIS_LDFLAGS, +# ARAVIS_LIBS. +# +AC_DEFUN([MM_LIB_ARAVIS], [ + MM_LIB_WITH_PKG_CONFIG([ARAVIS], [Aravis], [aravis-0.10], [], + [$1], [-laravis], + [arv.h], [arv_update_device_list], + [$2], [$3]) +]) + + # MM_LIB_MSGPACK([msgpack-prefix], [action-if-found], [action-if-not-found]) AC_DEFUN([MM_LIB_MSGPACK], [ AC_LANG_PUSH([C++]) From 045293a3b326b287a069d7c294f02e65142d8473 Mon Sep 17 00:00:00 2001 From: Hazen Babcock Date: Sun, 10 Nov 2024 16:54:55 -0500 Subject: [PATCH 3/3] Remove old commented out Aravis configuration. --- DeviceAdapters/configure.ac | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/DeviceAdapters/configure.ac b/DeviceAdapters/configure.ac index b60e8fd28..99ee08f7e 100644 --- a/DeviceAdapters/configure.ac +++ b/DeviceAdapters/configure.ac @@ -306,16 +306,6 @@ else AC_MSG_RESULT([not found]) fi -# Aravis (v0.10). -#AC_MSG_CHECKING(for Aravis_Linux) -#AM_CONDITIONAL([BUILD_ARAVIS_LINUX],[test -f "/usr/local/include/aravis-0.10/arv.h"]) -#if test -f "/usr/local/include/aravis-0.10/arv.h"; then -# AC_MSG_RESULT([found]) -#else -# AC_MSG_RESULT([not found]) -#fi - - # BaslerPylon AC_MSG_CHECKING(for Basler_Linux)