Warning, /graphics/libkexiv2/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #
0002 # SPDX-FileCopyrightText: 2010-2015 Gilles Caulier <caulier dot gilles at gmail dot com>
0003 #
0004 # SPDX-License-Identifier: BSD-3-Clause
0005 #
0006 
0007 cmake_minimum_required(VERSION 3.16)
0008 
0009 set(ECM_MIN_VERSION     "5.91.0")
0010 set(QT_MIN_VERSION      "5.15.0")
0011 set(EXIV2_MIN_VERSION   "0.25")
0012 
0013 project(libkexiv2 VERSION "5.1.0")
0014 
0015 set(CMAKE_CXX_STANDARD 14) # exiv is not compatible with C++ > 14 yet
0016 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0017 
0018 message(STATUS "----------------------------------------------------------------------------------")
0019 message(STATUS "Starting CMake configuration for: ${PROJECT_NAME}")
0020 
0021 # =======================================================
0022 # Information to update before to release this library.
0023 
0024 # Library version history:
0025 # API      ABI
0026 # 0.1.0 => 0.1.0
0027 # 0.1.1 => 0.2.0
0028 # 0.1.2 => 1.0.1
0029 # 0.1.3 => 1.0.1
0030 # 0.1.4 => 2.0.2
0031 # 0.1.5 => 2.1.1
0032 # 0.1.6 => 3.0.0
0033 # 0.1.7 => 4.0.1
0034 # 0.1.8 => 5.0.0
0035 # 0.2.0 => 6.0.0     (released with KDE 4.1.0)
0036 # 0.3.0 => 7.0.0     (released with KDE 4.1.2)
0037 # 0.4.0 => 7.1.0
0038 # 0.5.0 => 7.2.0     (Released with KDE 4.2.0)
0039 # 0.6.0 => 7.3.0     (Released with KDE 4.3.0)
0040 # 1.0.0 => 8.0.0     (Released with KDE 4.4.0)
0041 # 1.1.0 => 8.1.0     (Released with KDE 4.5.0)
0042 # 1.2.0 => 9.0.0     (Released with KDE 4.6.0) - Including XMP sidecar support
0043 # 2.0.0 => 10.0.0    (Released with KDE 4.7.0)
0044 # 2.1.0 => 10.0.1    (Released with KDE 4.7.1) - Add AltLangStrEdit visible lines API
0045 # 2.1.1 => 10.0.2    (Released with KDE 4.7.4) - Add AltLangStrEdit::setCurrentLanguageCode()
0046 # 2.2.0 => 11.0.0    (Released with KDE 4.8.1) - Remove deprecated methods
0047 # 2.3.0 => 11.1.0    (Released with KDE 4.8.2) - Add new static methods about XMP sidecar file management.
0048 # 2.3.1 => 11.2.0                              - Add new method to set specific XMP tag string
0049 # 2.4.0 => 11.3.0                              - Add new method to access on text edit widget from AltLangStrEdit
0050 # 5.0.0 => 15.0.0    (Released with KDE 5.x)
0051 # 5.1.0 => 15.0.0    (Released with KDE Gear) - Add QTransform-varianst methods RotationMatrix
0052 
0053 # Library ABI version used by linker.
0054 # For details : https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
0055 set(KEXIV2_LIB_SO_CUR_VERSION "15")
0056 set(KEXIV2_LIB_SO_REV_VERSION "0")
0057 set(KEXIV2_LIB_SO_AGE_VERSION "0")
0058 # TODO Qt6 or next ABI break: the very SO version is usually a single number, not a triple.
0059 # The library non-SO version as decribed in the link above is a separate thing
0060 # (cmp. VVERSION & SOVERSION args of set_target_properties(KF5KExiv2)
0061 # See below (where QT_MAJOR_VERSION is available) for resetting LIBKEXIV2_SO_VERSION to 0 with Qt6 builds
0062 set(LIBKEXIV2_SO_VERSION  "${KEXIV2_LIB_SO_CUR_VERSION}.${KEXIV2_LIB_SO_REV_VERSION}.${KEXIV2_LIB_SO_AGE_VERSION}")
0063 
0064 ############## ECM setup ######################
0065 
0066 find_package(ECM ${ECM_MIN_VERSION} CONFIG REQUIRED)
0067 set(CMAKE_MODULE_PATH ${libkexiv2_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
0068 
0069 include(KDEInstallDirs)
0070 include(KDECMakeSettings)
0071 include(KDECompilerSettings NO_POLICY_SCOPE)
0072 
0073 include(ECMGenerateHeaders)
0074 include(ECMSetupVersion)
0075 include(ECMMarkNonGuiExecutable)
0076 include(ECMQtDeclareLoggingCategory)
0077 include(ECMGenerateExportHeader)
0078 include(ECMDeprecationSettings)
0079 include(CMakePackageConfigHelpers)
0080 include(FeatureSummary)
0081 
0082 # reset to 0 once all deprecated API has been removed on full switch to Qt6
0083 if (QT_MAJOR_VERSION STREQUAL "6")
0084 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 5.1.0 CACHE STRING "Control the range of deprecated API excluded from the build [default=5.1.0].")
0085 else()
0086 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0087 endif()
0088 
0089 if (QT_MAJOR_VERSION STREQUAL "6")
0090     # starting with 0 for the new Qt6 series
0091     set(LIBKEXIV2_SO_VERSION "0")
0092 endif()
0093 
0094 ############## Find Packages ###################
0095 
0096 if (QT_MAJOR_VERSION STREQUAL "6")
0097     set(QT_MIN_VERSION "6.5.0")
0098 endif()
0099 
0100 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE
0101     COMPONENTS
0102         Core
0103         Gui
0104 )
0105 
0106 find_package(LibExiv2 ${EXIV2_MIN_VERSION} REQUIRED)
0107 
0108 ############## Targets #########################
0109 
0110 if (QT_MAJOR_VERSION STREQUAL "6")
0111     ecm_set_disabled_deprecation_versions(
0112         QT 6.5
0113     )
0114 else()
0115     ecm_set_disabled_deprecation_versions(
0116         QT 5.14 # QTransform::toAffine
0117     )
0118 endif()
0119 
0120 add_subdirectory(src)
0121 
0122 if (BUILD_TESTING)
0123     add_subdirectory(tests)
0124 endif()
0125 
0126 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)