Skip to content

Commit

Permalink
Merge pull request #373 from micro-manager/zaber-copy-zml-on-linux
Browse files Browse the repository at this point in the history
Zaber: Copy ZML libs during Linux install
  • Loading branch information
marktsuchida authored Sep 6, 2023
2 parents e851bf7 + 6f0ca5e commit ee5f90d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions DeviceAdapters/Zaber/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ libmmgr_dal_Zaber_la_SOURCES = \
libmmgr_dal_Zaber_la_LIBADD = $(MMDEVAPI_LIBADD) $(ZML_LIBS)
libmmgr_dal_Zaber_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(ZML_LDFLAGS)

dist_deviceadapter_DATA = $(ZML_LIBS_TO_COPY)

EXTRA_DIST = Zaber.vcxproj Zaber.vcxproj.filters license.txt
13 changes: 11 additions & 2 deletions DeviceAdapters/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,25 @@ if test -f "$zml_header_to_check"; then
ZML_LIBS="-lzml"
case $host in
*linux*)
ZML_LDFLAGS="-L${thirdpartypublic}/Zaber/zaber-motion/linux-amd64/lib" ;;
# Linux builds by users should install ZML libs
zml_linux_libdir="${thirdpartypublic}/Zaber/zaber-motion/linux-amd64/lib"
ZML_LDFLAGS="-L${zml_linux_libdir} -Wl,-rpath,"'\$$ORIGIN'
ZML_LIBS_TO_COPY="${zml_linux_libdir}/libzml.so.3.4 ${zml_linux_libdir}/libzaber-motion-lib-linux-amd64.so.3.4.3"
;;

*apple-darwin*)
ZML_LDFLAGS="-L${thirdpartypublic}/Zaber/zaber-motion/darwin/lib" ;;
# macOS build for packaging does not ship ZML
ZML_LDFLAGS="-L${thirdpartypublic}/Zaber/zaber-motion/darwin/lib"
ZML_LIBS_TO_COPY=""
;;
esac
else
AC_MSG_RESULT([not found])
fi
AC_SUBST(ZML_CPPFLAGS)
AC_SUBST(ZML_LIBS)
AC_SUBST(ZML_LDFLAGS)
AC_SUBST(ZML_LIBS_TO_COPY)


# Only build ... when the code is there
Expand Down

0 comments on commit ee5f90d

Please sign in to comment.