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

0001 # SPDX-FileCopyrightText: 2010-2018 Gilles Caulier <caulier dot gilles at gmail dot com>
0002 #
0003 # SPDX-License-Identifier: BSD-3-Clause
0004 
0005 cmake_minimum_required(VERSION 3.16.0)
0006 
0007 project(libkipi)
0008 
0009 message(STATUS "----------------------------------------------------------------------------------")
0010 message(STATUS "Starting CMake configuration for: ${PROJECT_NAME}")
0011 
0012 set(KF_MIN_VERSION      "5.91.0")
0013 set(QT_MIN_VERSION      "5.15.2")
0014 
0015 # =======================================================
0016 # Information to update before to release this library.
0017 
0018 # Library version history:
0019 # API      ABI
0020 # 0.1.0 => 0.0.0
0021 # 0.1.1 => 0.0.0
0022 # 0.1.2 => 1.0.1
0023 # 0.1.3 => 1.0.1
0024 # 0.1.4 => 1.0.1
0025 # 0.1.5 => 1.1.1
0026 # 0.1.6 => 2.0.0
0027 # 0.2.0 => 5.0.0  (released with KDE 4.1.0).
0028 # 0.3.0 => 6.0.0  (released with KDE 4.2.0).
0029 # 0.4.0 => 6.1.0  (released with KDE 4.3.0).
0030 # 1.0.0 => 7.0.0  (released with KDE 4.4.0).
0031 # 1.1.0 => 7.1.0  (released with KDE 4.5.0).
0032 # 1.2.0 => 8.0.0  (released with KDE 4.6.0).
0033 # 1.3.0 => 8.0.1  (released with KDE 4.7.1  - Set deprecated ImageInfo::title() and ImageInfo::setTitle(). Add ImageInfo::name() and ImageInfo::setName().
0034 # 1.4.0 => 8.0.2  (released with KDE 4.8.0  - Add 2 new slots in ConfigWidget class).
0035 # 1.5.0 => 9.0.0  (released with KDE 4.8.1  - Add Progress Manager feature support from Host application. Remove deprecated methods.
0036 #                                             Add new deprecated methods in ImageInfo class: description(), setDescription(),
0037 #                                             angle(), and setAngle()).
0038 # 1.6.0 => 9.1.0  (released with KDE 4.8.1  - Minor API fix).
0039 # 2.0.0 => 10.0.0 (released with KDE 4.10.0 - Including GoSC2012).
0040 # 2.1.0 => 11.0.0 (released with KDE 4.11.0 - Add edit hints).
0041 # 2.2.0 => 11.1.0 (released with KDE 4.14.0 - Apply patch #89165 from bug #340030).
0042 # 5.0.0 => 30.0.0 (Released with KDE Applications <= 15.12)
0043 # 5.1.0 => 31.0.0 (Released with KDE Applications 16.04)
0044 # 5.2.0 => 32.0.0 (Released with KDE Applications 16.05 - Fix API with pure virtual methods)
0045 
0046 # Library API version
0047 set(KIPI_LIB_MAJOR_VERSION "5")
0048 set(KIPI_LIB_MINOR_VERSION "2")
0049 set(KIPI_LIB_PATCH_VERSION "0")
0050 
0051 # Library ABI version used by linker.
0052 # For details : http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
0053 set(KIPI_LIB_SO_CUR_VERSION "32")
0054 set(KIPI_LIB_SO_REV_VERSION "0")
0055 set(KIPI_LIB_SO_AGE_VERSION "0")
0056 
0057 SET(LIBKIPI_LIB_VERSION "${KIPI_LIB_MAJOR_VERSION}.${KIPI_LIB_MINOR_VERSION}.${KIPI_LIB_PATCH_VERSION}")
0058 SET(LIBKIPI_SO_VERSION  "${KIPI_LIB_SO_CUR_VERSION}.${KIPI_LIB_SO_REV_VERSION}.${KIPI_LIB_SO_AGE_VERSION}")
0059 
0060 ############## ECM setup ######################
0061 
0062 find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED)
0063 set(CMAKE_MODULE_PATH ${libkkipi_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
0064 
0065 include(KDEInstallDirs)
0066 include(KDECMakeSettings)
0067 include(KDECompilerSettings NO_POLICY_SCOPE)
0068 
0069 include(GenerateExportHeader)
0070 include(ECMGenerateHeaders)
0071 include(ECMQtDeclareLoggingCategory)
0072 include(ECMSetupVersion)
0073 include(ECMDeprecationSettings)
0074 include(FeatureSummary)
0075 include(ECMInstallIcons)
0076 include(CMakePackageConfigHelpers)
0077 
0078 
0079 ############## Find Packages ###################
0080 
0081 find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS
0082              Core
0083              Widgets
0084              Gui
0085 )
0086 
0087 find_package(KF5 ${KF_MIN_VERSION}
0088              REQUIRED COMPONENTS
0089              Config
0090              XmlGui
0091              Service
0092 )
0093 
0094 ecm_setup_version(${LIBKIPI_LIB_VERSION}
0095                   VARIABLE_PREFIX      KIPI
0096                   VERSION_HEADER       "src/libkipi_version.h"
0097                   PACKAGE_VERSION_FILE "KF5KipiConfigVersion.cmake"
0098                   SOVERSION            ${LIBKIPI_SO_VERSION})
0099 
0100 ############## Targets #########################
0101 
0102 add_definitions(-DTRANSLATION_DOMAIN=\"libkipi\")
0103 
0104 ecm_set_disabled_deprecation_versions(
0105     QT 5.15.2
0106     KF 5.91
0107     KCOREADDONS 5.85 # indirectly KService::createInstance
0108     KSERVICE 5.85 # KService::createInstance
0109 )
0110 
0111 add_subdirectory(pics)
0112 add_subdirectory(src)
0113 
0114 if (BUILD_TESTING)
0115     add_subdirectory(tests)
0116 endif()
0117 
0118 ############## CMake Config Files ##############
0119 
0120 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Kipi")
0121 
0122 configure_package_config_file(
0123     "${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/KF5KipiConfig.cmake.in"
0124     "${CMAKE_CURRENT_BINARY_DIR}/KF5KipiConfig.cmake"
0125     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0126 )
0127 
0128 install(FILES
0129         "${CMAKE_CURRENT_BINARY_DIR}/KF5KipiConfig.cmake"
0130         "${CMAKE_CURRENT_BINARY_DIR}/KF5KipiConfigVersion.cmake"
0131         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0132         COMPONENT   Devel
0133 )
0134 
0135 install(EXPORT      KF5KipiTargets
0136         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0137         FILE        KF5KipiTargets.cmake
0138         NAMESPACE   KF5::
0139 )
0140 
0141 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)