[gthumb/wip/kalev/exiv2-0.27] Fix the build with exiv2 0.27
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/wip/kalev/exiv2-0.27] Fix the build with exiv2 0.27
- Date: Sun, 24 Feb 2019 08:06:31 +0000 (UTC)
commit c04a93bdfb575dfa6461e3207334335a9c1bad51
Author: Kalev Lember <klember redhat com>
Date: Thu Jan 31 15:01:02 2019 +0100
Fix the build with exiv2 0.27
Fixes: https://gitlab.gnome.org/GNOME/gthumb/issues/30
extensions/exiv2_tools/exiv2-utils.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index 4513771c..9efa944f 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -32,7 +32,10 @@
#include <sstream>
#include <vector>
#include <iomanip>
-#include <exiv2/xmp.hpp>
+#include <exiv2/exiv2.hpp>
+#if EXIV2_TEST_VERSION(0, 21, 0)
+#include <exiv2/xmp_exiv2.hpp>
+#endif
#include <gthumb.h>
#include "exiv2-utils.h"
@@ -1071,7 +1074,11 @@ dump_exif_data (Exiv2::ExifData &exifData,
try {
if (exifData.empty()) {
+#if EXIV2_TEST_VERSION(0,27,0)
+ throw Exiv2::Error(Exiv2::kerErrorMessage, " No Exif data found in the file");
+#else
throw Exiv2::Error(1, " No Exif data found in the file");
+#endif
}
Exiv2::ExifData::const_iterator end = exifData.end();
for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]