Commit f3743aee authored by Kalev Lember's avatar Kalev Lember
Browse files

Fix the build with exiv2 0.27

Fixes: #30
parent 72aa0c35
...@@ -32,7 +32,12 @@ ...@@ -32,7 +32,12 @@
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <iomanip> #include <iomanip>
#include <exiv2/exiv2.hpp>
#if EXIV2_TEST_VERSION(0, 27, 0)
#include <exiv2/xmp_exiv2.hpp>
#else
#include <exiv2/xmp.hpp> #include <exiv2/xmp.hpp>
#endif
#include <gthumb.h> #include <gthumb.h>
#include "exiv2-utils.h" #include "exiv2-utils.h"
...@@ -1071,7 +1076,11 @@ dump_exif_data (Exiv2::ExifData &exifData, ...@@ -1071,7 +1076,11 @@ dump_exif_data (Exiv2::ExifData &exifData,
try { try {
if (exifData.empty()) { 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"); throw Exiv2::Error(1, " No Exif data found in the file");
#endif
} }
Exiv2::ExifData::const_iterator end = exifData.end(); Exiv2::ExifData::const_iterator end = exifData.end();
for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != end; ++i) { for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment