Warning, /graphics/digikam/core/cmake/rules/RulesLibExiv2.cmake is written in an unsupported language. File is not indexed.

0001 #
0002 # SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com>
0003 #
0004 # SPDX-License-Identifier: BSD-3-Clause
0005 #
0006 
0007 find_package(LibExiv2 OPTIONAL_COMPONENTS)
0008 
0009 if(LibExiv2_FOUND AND ("${LibExiv2_VERSION}" VERSION_GREATER "0.27.99"))
0010 
0011     find_package(LibExiv2 REQUIRED)
0012     set(EXIV2_PACKAGE_NAME "LibExiv2")
0013 
0014 else()
0015 
0016     set(LibExiv2_FOUND FALSE)
0017     find_package(exiv2 REQUIRED)
0018     set(EXIV2_PACKAGE_NAME "exiv2")
0019 
0020 endif()
0021 
0022 set_package_properties(${EXIV2_PACKAGE_NAME} PROPERTIES
0023                        URL                   "https://www.exiv2.org"
0024                        TYPE                  RECOMMENDED
0025                        PURPOSE               "Library to manage image metadata (Required to build digiKam)"
0026 )
0027 
0028 if(LibExiv2_FOUND)
0029 
0030     if("${LibExiv2_VERSION}" VERSION_LESS ${EXIV2_MIN_VERSION})
0031 
0032         message(FATAL_ERROR "Exiv2 version is too old (${LibExiv2_VERSION})! Minimal version required:${EXIV2_MIN_VERSION}.")
0033 
0034     endif()
0035 
0036 else()
0037 
0038     if("${exiv2_VERSION}" VERSION_LESS ${EXIV2_MIN_VERSION})
0039 
0040         message(FATAL_ERROR "Exiv2 version is too old (${exiv2_VERSION})! Minimal version required:${EXIV2_MIN_VERSION}.")
0041 
0042     endif()
0043 
0044 endif()
0045 
0046 if(("${exiv2_VERSION}" VERSION_GREATER "0.27.99") OR ("${LibExiv2_VERSION}" VERSION_GREATER "0.27.99"))
0047 
0048     set(EXIV2_CXX_STANDARD 17)
0049 
0050 else()
0051 
0052     set(EXIV2_CXX_STANDARD 11)
0053 
0054 endif()