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.90.0")
0010 set(QT_MIN_VERSION      "5.15.0")
0011 set(EXIV2_MIN_VERSION   "0.25")
0012 
0013 project(libkexiv2 VERSION "5.0.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 
0052 # Library ABI version used by linker.
0053 # For details : https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
0054 set(KEXIV2_LIB_SO_CUR_VERSION "15")
0055 set(KEXIV2_LIB_SO_REV_VERSION "0")
0056 set(KEXIV2_LIB_SO_AGE_VERSION "0")
0057 # TODO Qt6 or next ABI break: the very SO version is usually a single number, not a triple.
0058 # The library non-SO version as decribed in the link above is a separate thing
0059 # (cmp. VVERSION & SOVERSION args of set_target_properties(KF5KExiv2)
0060 # You can start with 0 or 1 when KF6KExiv2 is created
0061 set(LIBKEXIV2_SO_VERSION  "${KEXIV2_LIB_SO_CUR_VERSION}.${KEXIV2_LIB_SO_REV_VERSION}.${KEXIV2_LIB_SO_AGE_VERSION}")
0062 
0063 ############## ECM setup ######################
0064 
0065 find_package(ECM ${ECM_MIN_VERSION} CONFIG REQUIRED)
0066 set(CMAKE_MODULE_PATH ${libkexiv2_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
0067 
0068 include(KDEInstallDirs)
0069 include(KDECMakeSettings)
0070 include(KDECompilerSettings NO_POLICY_SCOPE)
0071 
0072 include(ECMGenerateHeaders)
0073 include(ECMSetupVersion)
0074 include(ECMMarkNonGuiExecutable)
0075 include(ECMQtDeclareLoggingCategory)
0076 include(ECMGenerateExportHeader)
0077 include(CMakePackageConfigHelpers)
0078 include(FeatureSummary)
0079 
0080 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0081 
0082 ############## Find Packages ###################
0083 
0084 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE
0085     COMPONENTS
0086         Core
0087         Gui
0088 )
0089 if (QT_MAJOR_VERSION STREQUAL "6")
0090     find_package(Qt6Core5Compat)
0091 endif()
0092 
0093 find_package(LibExiv2 ${EXIV2_MIN_VERSION} REQUIRED)
0094 
0095 ############## Targets #########################
0096 
0097 add_definitions(
0098     -DQT_DEPRECATED_WARNINGS
0099     -DQT_DISABLE_DEPRECATED_BEFORE=0x050E00
0100     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
0101     -DQT_USE_QSTRINGBUILDER
0102     -DQT_NO_CAST_TO_ASCII
0103     -DQT_NO_CAST_FROM_ASCII
0104     -DQT_NO_CAST_FROM_BYTEARRAY
0105     -DQT_NO_URL_CAST_FROM_STRING
0106     -DQT_NO_KEYWORDS
0107     -DQT_STRICT_ITERATORS
0108     -DQT_NO_FOREACH
0109     -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
0110 )
0111 
0112 add_subdirectory(src)
0113 
0114 if (BUILD_TESTING)
0115     add_subdirectory(tests)
0116 endif()
0117 
0118 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)