exiv2 issue

Gilles Caulier caulier.gilles at gmail.com
Thu Nov 9 12:33:38 GMT 2023


exiv2ConfigVersion.cmake generated by VCPKG:

if (PACKAGE_FIND_VERSION_RANGE)
  message(AUTHOR_WARNING
    "`find_package()` specify a version range but the version strategy "
    "(ExactVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible "
    "with this request. Only the lower endpoint of the range will be used.")
endif()

set(PACKAGE_VERSION "0.28.0")

if("0.28.0" MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") # strip the tweak version
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
  set(CVF_VERSION_PATCH "${CMAKE_MATCH_3}")

  if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
  endif()
  if(NOT CVF_VERSION_MINOR VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
  endif()
  if(NOT CVF_VERSION_PATCH VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" CVF_VERSION_PATCH "${CVF_VERSION_PATCH}")
  endif()

  set(CVF_VERSION_NO_TWEAK
"${CVF_VERSION_MAJOR}.${CVF_VERSION_MINOR}.${CVF_VERSION_PATCH}")
else()
  set(CVF_VERSION_NO_TWEAK "0.28.0")
endif()

if(PACKAGE_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") #
strip the tweak version
  set(REQUESTED_VERSION_MAJOR "${CMAKE_MATCH_1}")
  set(REQUESTED_VERSION_MINOR "${CMAKE_MATCH_2}")
  set(REQUESTED_VERSION_PATCH "${CMAKE_MATCH_3}")

  if(NOT REQUESTED_VERSION_MAJOR VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" REQUESTED_VERSION_MAJOR
"${REQUESTED_VERSION_MAJOR}")
  endif()
  if(NOT REQUESTED_VERSION_MINOR VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" REQUESTED_VERSION_MINOR
"${REQUESTED_VERSION_MINOR}")
  endif()
  if(NOT REQUESTED_VERSION_PATCH VERSION_EQUAL 0)
    string(REGEX REPLACE "^0+" "" REQUESTED_VERSION_PATCH
"${REQUESTED_VERSION_PATCH}")
  endif()

  set(REQUESTED_VERSION_NO_TWEAK
      "${REQUESTED_VERSION_MAJOR}.${REQUESTED_VERSION_MINOR}.${REQUESTED_VERSION_PATCH}")
else()
  set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}")
endif()

if(REQUESTED_VERSION_NO_TWEAK STREQUAL CVF_VERSION_NO_TWEAK)
  set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()

if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
  set(PACKAGE_VERSION_EXACT TRUE)
endif()


# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P
set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
  return()
endif()

# check that the installed version has the same 32/64bit-ness as the
one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
  math(EXPR installedBits "8 * 8")
  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
  set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

Gilles

Le jeu. 9 nov. 2023 à 13:21, Gilles Caulier <caulier.gilles at gmail.com> a écrit :
>
> pkconfig file generated by VCPKG:
>
> prefix=${pcfiledir}/../..
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
>
> Name: exiv2
> Description: Exif/IPTC/Xmp C++ metadata library and tools plus ICC
> Profiles, Previews and more.
> Version: 0.28.0
> URL: https://exiv2.org
> Requires.private: INIReader
> Libs: "-L${libdir}" -lexiv2
> Libs.private: -liconv
> Cflags: "-I${includedir}"
>
>
> Gilles
>
> Le jeu. 9 nov. 2023 à 12:35, Gilles Caulier <caulier.gilles at gmail.com> a écrit :
> >
> > Note: Exiv2 have been installed with VCPKG of course. It's not
> > compiled outside VCPKG as with MXE tool-chain.
> >
> > https://github.com/microsoft/vcpkg/tree/master/ports/exiv2
> >
> > Gilles
> >
> > Le jeu. 9 nov. 2023 à 12:30, Gilles Caulier <caulier.gilles at gmail.com> a écrit :
> > >
> > > Under Windows, this do not work with git/master. Version installed is 0.28.0
> > >
> > > -- Found LibExiv2: E:/dk/x64-windows/lib/exiv2.lib (found version "..")
> > > CMake Error at core/cmake/rules/RulesLibExiv2.cmake:18 (message):
> > >   Exiv2 version is too old (..)! Minimal version required:0.27.1.
> > > Call Stack (most recent call first):
> > >   core/CMakeLists.txt:72 (include)
> > >
> > > Detection works as expected 2 days ago.
> > >
> > > Gilles
> > >
> > >
> > > Le jeu. 9 nov. 2023 à 08:20, Maik Qualmann <metzpinguin at gmail.com> a écrit :
> > > >
> > > > The compilation problems are now fixed in git/master.
> > > >
> > > > Maik
> > > >
> > > > Am Mittwoch, 8. November 2023, 21:13:28 CET schrieb leoutation at gmx.fr:
> > > > > On 11/8/23 19:53, Maik Qualmann wrote:
> > > > > > Apart from you compiling problem, Exiv2 has nothing to do with displaying
> > > > > > layers in XCF files.
> > > > >
> > > > > OK, i have to try to build first.
> > > > > Here full error message:
> > > > >
> > > > > -- Configuring done (38.0s)
> > > > > CMake Error at core/libs/metadataengine/CMakeLists.txt:106
> > > > > (include_directories):
> > > > >    Error evaluating generator expression:
> > > > >
> > > > >      $<TARGET_PROPERTY:exiv2lib,INTERFACE_INCLUDE_DIRECTORIES>
> > > > >
> > > > >    Target "exiv2lib" not found.
> > > > >
> > > > >
> > > > > CMake Error at core/libs/metadataengine/CMakeLists.txt:106
> > > > > (include_directories):
> > > > >    Error evaluating generator expression:
> > > > >
> > > > >      $<TARGET_PROPERTY:exiv2lib,INTERFACE_INCLUDE_DIRECTORIES>
> > > > >
> > > > >    Target "exiv2lib" not found.
> > > > >
> > > > > > Maik
> > > > > >
> > > > > > Am Mittwoch, 8. November 2023, 19:00:03 CET schrieb leoutation at gmx.fr:
> > > > > >> On 11/8/23 18:45, Gilles Caulier wrote:
> > > > > >>> Hi,
> > > > > >>>
> > > > > >>> Clean up the build dir properly. It's known that Exiv2 can be
> > > > > >>> problematic when upgrading the library.
> > > > > >>
> > > > > >> I did it, i get same issue
> > > > > >>
> > > > > >>> Take care also about the headers files available. Do not mix 2
> > > > > >>> different versions of the library. It's known that Exiv2 does not
> > > > > >>> support this kind of usage.
> > > > > >>
> > > > > >> I have only exiv2 and libgexiv2 (Gimp depend)  installed on my system
> > > > > >>
> > > > > >>> Best
> > > > > >>>
> > > > > >>> Gilles Caulier
> > > > > >>>
> > > > > >>> Le mer. 8 nov. 2023 à 18:42, <leoutation at gmx.fr> a écrit :
> > > > > >>>> Hi
> > > > > >>>> I get CMake error when building digikam git
> > > > > >>>> 'Target "exiv2lib" not found'
> > > > > >>>> But exiv2 is installed on my Arch system
> > > > > >>>> https://archlinux.org/packages/extra/x86_64/exiv2/
> > > > > >>>> version: exiv2 0.28.1-1  /usr/include/exiv2/exiv2lib_export.h
> > > > > >>>> To know: i suspect this exiv2 version causing  issue (1) with XCF
> > > > > >>>> files,
> > > > > >>>> that's why i try to build again digikam git.
> > > > > >>>> (1) Digikam git doesn't display layers in XCF files
> > > > > >>>>
> > > > > >>>> --
> > > > > >>>> Maderios
> > > > > >>
> > > > > >> --
> > > > > >> Maderios
> > > > >
> > > > > --
> > > > > Maderios
> > > >
> > > >
> > > >
> > > >


More information about the Digikam-users mailing list