Warning, /graphics/digikam/core/libs/metadataengine/CMakeLists.txt 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 # SPDX-FileCopyrightText: 2015      by Veaceslav Munteanu, <veaceslav dot munteanu90 at gmail dot com>
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #
0007 
0008 APPLY_COMMON_POLICIES()
0009 
0010 kde_enable_exceptions()
0011 
0012 # TODO: How to extract exiv2lib definitions properties with cmake import interface?
0013 #add_definitions($<TARGET_PROPERTY:exiv2lib,INTERFACE_COMPILE_DEFINITIONS>)
0014 
0015 if(WIN32)
0016     add_definitions(-DEXV_HAVE_DLL)
0017 endif()
0018 
0019 # Exiv2 version < 0.28 use auto_ptr instead unique_ptr which is deprecated.
0020 
0021 if("${LibExiv2_VERSION}" VERSION_LESS "0.27.99")
0022 
0023     DISABLE_GCC_COMPILER_WARNINGS("5.99.99" "-Wno-deprecated")
0024 
0025     # NOTE: under MacOS, this line has no effect... Why ?
0026     DISABLE_CLANG_COMPILER_WARNINGS("3.99.99" "-Wdeprecated-declarations")
0027 
0028 endif()
0029 
0030 set(libdmetadata_SRCS
0031 
0032     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine.cpp
0033     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_p.cpp
0034     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_data.cpp
0035     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_data_p.cpp
0036     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_exif.cpp
0037     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_fileio.cpp
0038     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_item.cpp
0039     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_comments.cpp
0040     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_iptc.cpp
0041     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_gps.cpp
0042     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_xmp.cpp
0043     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_previews.cpp
0044     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaengine_rotation.cpp
0045     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaenginesettings.cpp
0046     ${CMAKE_CURRENT_SOURCE_DIR}/engine/metaenginesettingscontainer.cpp
0047 
0048     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata.cpp
0049     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_video.cpp
0050     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_exiftool.cpp
0051     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_libraw.cpp
0052 
0053 # Not used anymore as IM is very unstable with corrupted files. ExifTool can be used instead.
0054 #    ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_imagemagick.cpp
0055 
0056     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_fileio.cpp
0057     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_comments.cpp
0058     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_template.cpp
0059     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_exif.cpp
0060     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_iptc.cpp
0061     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_labels.cpp
0062     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_faces.cpp
0063     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_history.cpp
0064     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_photo.cpp
0065     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_tags.cpp
0066     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_generic.cpp
0067     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_xmp.cpp
0068     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadatasettings.cpp
0069     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadatasettingscontainer.cpp
0070     ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/geodetictools.cpp
0071 
0072     ${CMAKE_CURRENT_SOURCE_DIR}/containers/metadatainfo.cpp
0073     ${CMAKE_CURRENT_SOURCE_DIR}/containers/photoinfocontainer.cpp
0074     ${CMAKE_CURRENT_SOURCE_DIR}/containers/videoinfocontainer.cpp
0075     ${CMAKE_CURRENT_SOURCE_DIR}/containers/template.cpp
0076     ${CMAKE_CURRENT_SOURCE_DIR}/containers/captionvalues.cpp
0077 
0078     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolthread.cpp
0079     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolparser.cpp
0080     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolparser_command.cpp
0081     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolparser_output.cpp
0082     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolparser_p.cpp
0083     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolprocess.cpp
0084     ${CMAKE_CURRENT_SOURCE_DIR}/exiftool/exiftoolprocess_p.cpp
0085 
0086     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoint.cpp
0087     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor.cpp
0088     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_canon.cpp
0089     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_exif.cpp
0090     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_nikon.cpp
0091     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_panasonic.cpp
0092     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_sony.cpp
0093     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_extractor_xmp.cpp
0094     ${CMAKE_CURRENT_SOURCE_DIR}/focuspoint/focuspoints_writer.cpp
0095 )
0096 
0097 if (HEIF_FOUND)
0098 
0099     set(libdmetadata_SRCS
0100         ${libdmetadata_SRCS}
0101         ${CMAKE_CURRENT_SOURCE_DIR}/dmetadata/dmetadata_libheif.cpp
0102     )
0103 
0104 endif()
0105 
0106 include_directories(
0107     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Widgets,INTERFACE_INCLUDE_DIRECTORIES>
0108     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Gui,INTERFACE_INCLUDE_DIRECTORIES>
0109     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Core,INTERFACE_INCLUDE_DIRECTORIES>
0110     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Xml,INTERFACE_INCLUDE_DIRECTORIES>
0111 
0112     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::ConfigCore,INTERFACE_INCLUDE_DIRECTORIES>
0113     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::I18n,INTERFACE_INCLUDE_DIRECTORIES>
0114 )
0115 
0116 if(LibExiv2_FOUND)
0117 
0118     include_directories($<TARGET_PROPERTY:LibExiv2_INCLUDE_DIRS>)
0119 
0120 else()
0121 
0122     include_directories($<TARGET_PROPERTY:exiv2lib,INTERFACE_INCLUDE_DIRECTORIES>)
0123 
0124 endif()
0125 
0126 # Used by digikamcore
0127 add_library(core_dmetadata_obj OBJECT ${libdmetadata_SRCS})
0128 
0129 target_compile_definitions(core_dmetadata_obj
0130                            PRIVATE
0131                            digikamcore_EXPORTS
0132 )
0133 
0134 if(NOT Qt6_FOUND)
0135 
0136     set_target_properties(core_dmetadata_obj
0137                           PROPERTIES
0138                           CXX_STANDARD ${EXIV2_CXX_STANDARD}
0139                           CXX_STANDARD_REQUIRED YES
0140                           CXX_EXTENSIONS NO
0141     )
0142 
0143 endif()