Add gphoto2 detection using pkg-config.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1377b2dbf0)
r14.0.x
Slávek Banko 5 years ago
parent c814fecf3e
commit 2d07cb8bc6
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -308,19 +308,30 @@ fi
have_gphoto=no
if test "x$build_gphoto" != "xno"; then
KDE_PKG_CHECK_MODULES(GPHOTO, libgphoto2,
have_gphoto=yes, have_gphoto=no)
if test "x$have_gphoto" != "xyes"; then
AC_PATH_PROG(GPHOTO_CONFIG,gphoto2-config)
AC_PATH_PROG(GPHOTO_PORT_CONFIG,gphoto2-port-config)
if test -n "${GPHOTO_CONFIG}"; then
GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`"
AC_SUBST(GPHOTO_CFLAGS)
LIB_GPHOTO="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`"
AC_SUBST(LIB_GPHOTO)
GPHOTO_LIBS="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`"
AC_SUBST(GPHOTO_LIBS)
have_gphoto=yes
fi
fi
if test "x$have_gphoto" = "xyes"; then
AC_CHECK_LIB(gphoto2_port, gp_port_info_get_name, have_gphoto2_5=yes, have_gphoto2_5=no)
if test "x$have_gphoto2_5" != "xno"; then
AC_DEFINE(HAVE_GPHOTO2_5, 1, [have gphoto 2.5])
fi
else
fi
if test "x$have_gphoto" != "xyes"; then
AC_MSG_WARN([gPhoto2 not found, some plugins will not be compiled.])
fi
fi

@ -6,7 +6,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = kipiplugin_kameraklient.la
kipiplugin_kameraklient_la_DEPENDENCIES = $(LIBKIPI_LIBS_DEP)
kipiplugin_kameraklient_la_LIBADD = $(LIB_GPHOTO) $(LIBKIPI_LIBS) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT)
kipiplugin_kameraklient_la_LIBADD = $(GPHOTO_LIBS) $(LIBKIPI_LIBS) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT)
kipiplugin_kameraklient_la_LDFLAGS = $(KIPI_PLUGINS_COMMON_LDFLAGS) -module $(KDE_PLUGIN) $(all_libraries) -lkipiplugins

Loading…
Cancel
Save