Use exiv2 for metadata handling

This commit is contained in:
Alberto Griggio
2019-05-06 09:27:44 +02:00
parent a2e2ace1c8
commit c360fd7e2c
49 changed files with 1359 additions and 17510 deletions

View File

@@ -318,6 +318,24 @@ pkg_check_modules (SIGC REQUIRED sigc++-2.0>=2.3.1)
pkg_check_modules (LENSFUN REQUIRED lensfun>=0.2)
pkg_check_modules (RSVG REQUIRED librsvg-2.0>=2.40)
# Require exiv2 >= 0.24 to make sure everything we need is available
#find_package(Exiv2 0.24 REQUIRED)
pkg_check_modules(EXIV2 REQUIRED exiv2>=0.24)
#include_directories(SYSTEM ${Exiv2_INCLUDE_DIRS})
#list(APPEND LIBS ${EXIV2_LIBRARIES})
add_definitions(${EXIV2_DEFINITIONS})
set(_exiv2_libs ${EXIV2_LIBRARIES})
set(EXIV2_LIBRARIES "")
foreach(l ${_exiv2_libs})
set(_el "_el-NOTFOUND")
if(EXIV2_LIBRARY_DIRS)
find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS} NO_DEFAULT_PATH)
else()
find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS})
endif()
set(EXIV2_LIBRARIES ${EXIV2_LIBRARIES} ${_el})
endforeach()
if(WIN32)
add_definitions(-DWIN32)
add_definitions(-D_WIN32)
@@ -333,7 +351,6 @@ endif()
pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
pkg_check_modules(FFTW3F REQUIRED fftw3f)
pkg_check_modules(IPTCDATA REQUIRED libiptcdata)
pkg_check_modules(TIFF REQUIRED libtiff-4>=4.0.4)
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
@@ -398,6 +415,7 @@ if(OPENMP_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${FFTW3F_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES)
foreach(l ${FFTW3F_LIBRARIES})
set(_f "_f-NOTFOUND")
find_library(_f ${l} PATHS ${FFTW3F_LIBRARY_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_f})
endforeach()
@@ -538,11 +556,13 @@ foreach(l ${LENSFUN_LIBRARIES})
# the NO_DEFAULT_PATH is to make sure we find the lensfun version we
# want, and not the system's one (e.g. if we have a custom version
# installed in a non-standard location)
set(_l "_l-NOTFOUND")
find_library(_l ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH)
else()
# LENSFUN_LIBRARY_DIRS can be empty if lensfun is installed in the
# default path. In this case, adding NO_DEFAULT_PATH would make
# find_library fail...
set(_l "_l-NOTFOUND")
find_library(_l ${l})
endif()
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_l})
@@ -557,7 +577,6 @@ int main()
}" LENSFUN_HAS_LOAD_DIRECTORY)
add_subdirectory(rtexif)
add_subdirectory(rtengine)
add_subdirectory(rtgui)
add_subdirectory(rtdata)