Skip to content

Commit

Permalink
AlliedVisionCamera: Set up with ./configure
Browse files Browse the repository at this point in the history
Also fix a bug in Autoconf function MM_LIB_IFELSE() (allow
MM_LIB_SIMPLE() to work even if no function to test is given).
  • Loading branch information
marktsuchida committed Oct 26, 2023
1 parent 273a57d commit 8eb1882
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 7 deletions.
18 changes: 13 additions & 5 deletions DeviceAdapters/AlliedVisionCamera/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@

AUTOMAKE_OPTIONS = subdir-objects
AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -I$(VIMBA_X_HOME)/api/include
AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(VIMBA_X_CPPFLAGS)
deviceadapter_LTLIBRARIES = libmmgr_dal_AlliedVisionCamera.la
libmmgr_dal_AlliedVisionCamera_la_SOURCES = AlliedVisionHub.h AlliedVisionHub.cpp AlliedVisionDeviceBase.h AlliedVisionDeviceBase.cpp AlliedVisionCamera.h AlliedVisionCamera.cpp Loader/Constants.h Loader/LibLoader.h Loader/LibLoader.cpp $(VIMBA_X_HOME)/api/include/VmbC/VmbC.h $(VIMBA_X_HOME)/api/include/VmbC/VmbCommonTypes.h $(VIMBA_X_HOME)/api/include/VmbC/VmbConstants.h $(VIMBA_X_HOME)/api/include/VmbC/VmbCTypeDefinitions.h $(VIMBA_X_HOME)/api/include/VmbImageTransform/VmbTransform.h $(VIMBA_X_HOME)/api/include/VmbImageTransform/VmbTransformTypes.h

libmmgr_dal_AlliedVisionCamera_la_SOURCES = \
AlliedVisionCamera.cpp \
AlliedVisionCamera.h \
AlliedVisionDeviceBase.cpp \
AlliedVisionDeviceBase.h \
AlliedVisionHub.cpp \
AlliedVisionHub.h \
Loader/Constants.h \
Loader/LibLoader.cpp \
Loader/LibLoader.h

libmmgr_dal_AlliedVisionCamera_la_LIBADD = $(MMDEVAPI_LIBADD)
libmmgr_dal_AlliedVisionCamera_la_LDFLAGS = $(MMDEVAPI_LDFLAGS)

EXTRA_DIST = AlliedVisionCamera.vcproj AlliedVisionCamera.vcproj.filters AlliedVisionCamera.vcproj.user
5 changes: 4 additions & 1 deletion DeviceAdapters/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I ../m4

if BUILD_ALLIED_VISION_CAMERA
ALLIED_VISION_CAMERA = AlliedVisionCamera
endif
if BUILD_ANDOR
ANDOR = Andor
endif
Expand Down Expand Up @@ -71,6 +74,7 @@ endif

# Please keep these ASCII-lexically sorted (pass through sort(1)).
SUBDIRS = \
$(ALLIED_VISION_CAMERA) \
$(ANDOR) \
$(ANDORLASERCOMBINER) \
$(ANDORSDK3) \
Expand All @@ -95,7 +99,6 @@ SUBDIRS = \
$(V4L) \
$(ZABER) \
AAAOTF \
AlliedVisionCamera \
AOTF \
ASIFW1000 \
ASIStage \
Expand Down
19 changes: 19 additions & 0 deletions DeviceAdapters/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,22 @@ AS_IF([test "x$want_opencv" != xno],

AM_CONDITIONAL([BUILD_OPENCV], [test "x$use_opencv" = xyes])

# Vimba X (Allied Vision) SDK
MM_ARG_WITH_OPTIONAL_LIB([Vimba X], [vimba-x], [VIMBA_X])
AS_IF([test "x$want_vimba_x" != xno],
[
MM_LIB_VIMBA_X([$VIMBA_X_PREFIX],
[use_vimba_x=yes],
[
use_vimba_x=no
AS_IF([test "x$want_vimba_x" = xyes],
[MM_MSG_OPTIONAL_LIB_FAILURE([Vimba X], [vimba-x])])
])
],
[use_vimba_x=no])

AM_CONDITIONAL([BUILD_ALLIED_VISION_CAMERA], [test "x$use_vimba_x" = xyes])

# Zaber Motion Library (hack: only support 3rdpartypublic copy currently)
AC_MSG_CHECKING([for Zaber Motion Library in 3rdpartypublic])
zml_header_to_check="${thirdpartypublic}/Zaber/zaber-motion/include/zaber/motion/library.h"
Expand Down Expand Up @@ -677,4 +693,7 @@ echo "m4_text_wrap([$use_libusb_0_1],
echo "m4_text_wrap([$use_opencv],
[ ],
[ Build with OpenCV: ])"
echo "m4_text_wrap([$use_vimba_x],
[ ],
[ Build with Vimba X: ])"
echo ""
2 changes: 1 addition & 1 deletion m4/mm_lib_ifelse.m4
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ AC_DEFUN([MM_LIB_IFELSE], [
])
],
[
mm_lib_ifelse_have_$1=no
mm_lib_ifelse_have_$1=yes
])
])
Expand Down
11 changes: 11 additions & 0 deletions m4/mm_libs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,14 @@ AC_DEFUN([MM_LIB_USB_0_1], [
[$1], [-lusb], [usb.h], [usb_init],
[$2], [$3])
])


# Check for Allied Vision Vimba X SDK
#
# MM_LIB_VIMBA_X([Vimba X api prefix], [action-if-found], [action-if-not-found])
#
# Defines variable VIMBA_X_CPPFLAGS.
#
AC_DEFUN([MM_LIB_VIMBA_X], [
MM_LIB_SIMPLE([VIMBA_X], [Vimba X], [$1], [], [VmbC/VmbC.h], [], [$2], [$3])
])

0 comments on commit 8eb1882

Please sign in to comment.