Warning, /graphics/krita/libs/version/kritaversion.h.cmake is written in an unsupported language. File is not indexed.

0001 /* This file is part of the Krita libraries
0002     SPDX-FileCopyrightText: 2003 David Faure <faure@kde.org>
0003     SPDX-FileCopyrightText: 2003 Lukas Tinkl <lukas@kde.org>
0004     SPDX-FileCopyrightText: 2004 Nicolas Goutte <goutte@kde.org>
0005     SPDX-FileCopyrightText: 2015 Jarosław Staniek <staniek@kde.org>
0006 
0007     SPDX-License-Identifier: LGPL-2.0-or-later
0008 */
0009 
0010 #ifndef _KRITA_VERSION_H_
0011 #define _KRITA_VERSION_H_
0012 
0013 #include "kritaversion_export.h"
0014 
0015 // -- WARNING: do not edit values below, instead edit KRITA_* in /CMakeLists.txt --
0016 
0017 /**
0018 * @def KRITA_VERSION_STRING
0019 * @ingroup KritaMacros
0020 * @brief Version of Krita as string, at compile time
0021 *
0022 * This macro contains the Krita version in string form. As it is a macro,
0023 * it contains the version at compile time.
0024 *
0025 * @note The version string might contain spaces and special characters,
0026 * especially for development versions of Krita.
0027 * If you use that macro directly for a file format (e.g. OASIS Open Document)
0028 * or for a protocol (e.g. http) be careful that it is appropriate.
0029 * (Fictional) example: "3.0 Alpha"
0030 */
0031 #define KRITA_VERSION_STRING "@KRITA_VERSION_STRING@"
0032 
0033 /**
0034  * @def KRITA_STABLE_VERSION_MAJOR
0035  * @ingroup KritaMacros
0036  * @brief Major version of stable Krita, at compile time
0037  * KRITA_VERSION_MAJOR is computed based on this value.
0038 */
0039 #define KRITA_STABLE_VERSION_MAJOR @KRITA_STABLE_VERSION_MAJOR@
0040 
0041 /**
0042  * @def KRITA_VERSION_MAJOR
0043  * @ingroup KritaMacros
0044  * @brief Major version of Krita, at compile time
0045  *
0046  * Generally it's the same as KRITA_STABLE_VERSION_MAJOR but for unstable x.0
0047  * x is decreased by one, e.g. 3.0 Beta is 2.99.
0048 */
0049 #if !defined KRITA_STABLE && @KRITA_STABLE_VERSION_MINOR@ == 0
0050 # define KRITA_VERSION_MAJOR (KRITA_STABLE_VERSION_MAJOR - 1)
0051 #else
0052 # define KRITA_VERSION_MAJOR KRITA_STABLE_VERSION_MAJOR
0053 #endif
0054 
0055 /**
0056  * @def KRITA_STABLE_VERSION_MINOR
0057  * @ingroup KritaMacros
0058  * @brief Minor version of stable Krita, at compile time
0059  * KRITA_VERSION_MINOR is computed based on this value.
0060  */
0061 #define KRITA_STABLE_VERSION_MINOR @KRITA_STABLE_VERSION_MINOR@
0062 
0063 /**
0064  * @def KRITA_VERSION_MINOR
0065  * @ingroup KritaMacros
0066  * @brief Minor version of Krita, at compile time
0067  *
0068  * Generally it's equal to KRITA_STABLE_VERSION_MINOR for stable releases,
0069  * equal to 99 for x.0 unstable releases (e.g. it's 3.0 Beta has minor version 99),
0070  * and equal to KRITA_STABLE_VERSION_MINOR-1 for unstable releases other than x.0.
0071  */
0072 #ifdef KRITA_STABLE
0073 # define KRITA_VERSION_MINOR KRITA_STABLE_VERSION_MINOR
0074 #elif KRITA_STABLE_VERSION_MINOR == 0
0075 # define KRITA_VERSION_MINOR 99
0076 #else
0077 # define KRITA_VERSION_MINOR (KRITA_STABLE_VERSION_MINOR - 1)
0078 #endif
0079 
0080 /**
0081  * @def KRITA_VERSION_RELEASE
0082  * @ingroup KritaMacros
0083  * @brief Release version of Krita, at compile time.
0084  * 89 for Alpha.
0085  */
0086 #define KRITA_VERSION_RELEASE @KRITA_VERSION_RELEASE@
0087 
0088 /**
0089  * @def KRITA_STABLE_VERSION_RELEASE
0090  * @ingroup KritaMacros
0091  * @brief Release version of Krita, at compile time.
0092  *
0093  * Equal to KRITA_VERSION_RELEASE for stable releases and 0 for unstable ones.
0094  */
0095 #ifdef KRITA_STABLE
0096 # define KRITA_STABLE_VERSION_RELEASE 0
0097 #else
0098 # define KRITA_STABLE_VERSION_RELEASE @KRITA_VERSION_RELEASE@
0099 #endif
0100 
0101 /**
0102  * @def KRITA_ALPHA
0103  * @ingroup KritaMacros
0104  * @brief If defined (1..9), indicates at compile time that Krita is in alpha stage
0105  */
0106 #cmakedefine KRITA_ALPHA @KRITA_ALPHA@
0107 
0108 /**
0109  * @def KRITA_BETA
0110  * @ingroup KritaMacros
0111  * @brief If defined (1..9), indicates at compile time that Krita is in beta stage
0112  */
0113 #cmakedefine KRITA_BETA @KRITA_BETA@
0114 
0115 /**
0116  * @def KRITA_RC
0117  * @ingroup KritaMacros
0118  * @brief If defined (1..9), indicates at compile time that Krita is in "release candidate" stage
0119  */
0120 #cmakedefine KRITA_RC @KRITA_RC@
0121 
0122 /**
0123  * @def KRITA_STABLE
0124  * @ingroup KritaMacros
0125  * @brief If defined, indicates at compile time that Krita is in stable stage
0126  */
0127 #cmakedefine KRITA_STABLE @KRITA_STABLE@
0128 
0129 /**
0130  * @ingroup KritaMacros
0131  * @brief Make a number from the major, minor and release number of a Krita version
0132  *
0133  * This function can be used for preprocessing when KRITA_IS_VERSION is not
0134  * appropriate.
0135  */
0136 #define KRITA_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
0137 
0138 /**
0139  * @ingroup KritaMacros
0140  * @brief Version of Krita as number, at compile time
0141  *
0142  * This macro contains the Krita version in number form. As it is a macro,
0143  * it contains the version at compile time. See version() if you need
0144  * the Krita version used at runtime.
0145  */
0146 #define KRITA_VERSION \
0147     KRITA_MAKE_VERSION(KRITA_VERSION_MAJOR,KRITA_VERSION_MINOR,KRITA_VERSION_RELEASE)
0148 
0149 #endif // _KRITA_VERSION_H_