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 set(CMAKE_MIN_VERSION   "3.16.0")
0008 set(ECM_MIN_VERSION     "5.90.0")
0009 set(QT_MIN_VERSION      "5.15.0")
0010 set(EXIV2_MIN_VERSION   "0.25")
0011 
0012 cmake_minimum_required(VERSION ${CMAKE_MIN_VERSION})
0013 
0014 project(libkexiv2 VERSION "5.0.0")
0015 
0016 set(CMAKE_CXX_STANDARD 14) # exiv is not compatible with C++ > 14 yet
0017 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0018 
0019 message(STATUS "----------------------------------------------------------------------------------")
0020 message(STATUS "Starting CMake configuration for: ${PROJECT_NAME}")
0021 
0022 # =======================================================
0023 # Information to update before to release this library.
0024 
0025 # Library version history:
0026 # API      ABI
0027 # 0.1.0 => 0.1.0
0028 # 0.1.1 => 0.2.0
0029 # 0.1.2 => 1.0.1
0030 # 0.1.3 => 1.0.1
0031 # 0.1.4 => 2.0.2
0032 # 0.1.5 => 2.1.1
0033 # 0.1.6 => 3.0.0
0034 # 0.1.7 => 4.0.1
0035 # 0.1.8 => 5.0.0
0036 # 0.2.0 => 6.0.0     (released with KDE 4.1.0)
0037 # 0.3.0 => 7.0.0     (released with KDE 4.1.2)
0038 # 0.4.0 => 7.1.0
0039 # 0.5.0 => 7.2.0     (Released with KDE 4.2.0)
0040 # 0.6.0 => 7.3.0     (Released with KDE 4.3.0)
0041 # 1.0.0 => 8.0.0     (Released with KDE 4.4.0)
0042 # 1.1.0 => 8.1.0     (Released with KDE 4.5.0)
0043 # 1.2.0 => 9.0.0     (Released with KDE 4.6.0) - Including XMP sidecar support
0044 # 2.0.0 => 10.0.0    (Released with KDE 4.7.0)
0045 # 2.1.0 => 10.0.1    (Released with KDE 4.7.1) - Add AltLangStrEdit visible lines API
0046 # 2.1.1 => 10.0.2    (Released with KDE 4.7.4) - Add AltLangStrEdit::setCurrentLanguageCode()
0047 # 2.2.0 => 11.0.0    (Released with KDE 4.8.1) - Remove deprecated methods
0048 # 2.3.0 => 11.1.0    (Released with KDE 4.8.2) - Add new static methods about XMP sidecar file management.
0049 # 2.3.1 => 11.2.0                              - Add new method to set specific XMP tag string
0050 # 2.4.0 => 11.3.0                              - Add new method to access on text edit widget from AltLangStrEdit
0051 # 5.0.0 => 15.0.0    (Released with KDE 5.x)
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 # You can start with 0 or 1 when KF6KExiv2 is created
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(GenerateExportHeader)
0078 include(CMakePackageConfigHelpers)
0079 include(FeatureSummary)
0080 
0081 ############## Find Packages ###################
0082 
0083 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE
0084     COMPONENTS
0085         Core
0086         Gui
0087 )
0088 if (QT_MAJOR_VERSION STREQUAL "6")
0089     find_package(Qt6Core5Compat)
0090 endif()
0091 
0092 find_package(LibExiv2 ${EXIV2_MIN_VERSION} REQUIRED)
0093 
0094 ############## Targets #########################
0095 
0096 add_definitions(
0097     -DQT_DEPRECATED_WARNINGS
0098     -DQT_DISABLE_DEPRECATED_BEFORE=0x050E00
0099     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
0100     -DQT_USE_QSTRINGBUILDER
0101     -DQT_NO_CAST_TO_ASCII
0102     -DQT_NO_CAST_FROM_ASCII
0103     -DQT_NO_CAST_FROM_BYTEARRAY
0104     -DQT_NO_URL_CAST_FROM_STRING
0105     -DQT_NO_KEYWORDS
0106     -DQT_STRICT_ITERATORS
0107     -DQT_NO_FOREACH
0108     -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
0109 )
0110 
0111 add_subdirectory(src)
0112 
0113 if (BUILD_TESTING)
0114     add_subdirectory(tests)
0115 endif()
0116 
0117 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)