Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aravis/pkgconfig #525

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DeviceAdapters/Aravis/AravisCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <vector>
#include <string>
#include <algorithm>

#include <cstdint>

std::vector<std::string> supportedPixelFormats = {
"Mono8",
Expand Down
14 changes: 5 additions & 9 deletions DeviceAdapters/Aravis/Makefile.am
Original file line number Diff line number Diff line change
@@ -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)

26 changes: 18 additions & 8 deletions DeviceAdapters/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +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)
Expand Down Expand Up @@ -364,6 +356,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],
Expand Down Expand Up @@ -430,6 +439,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"
Expand Down
15 changes: 15 additions & 0 deletions m4/mm_libs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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++])
Expand Down