1/** 2 * @file 3 * @brief Header file that includes the version number of libopenshot 4 * @author Jonathan Thomas <jonathan@openshot.org> 5 * 6 * @ref License 7 */ 8 9/* LICENSE 10 * 11 * Copyright (c) 2008-2019 OpenShot Studios, LLC 12 * <http://www.openshotstudios.com/>. This file is part of 13 * OpenShot Library (libopenshot), an open-source project dedicated to 14 * delivering high quality video editing and animation solutions to the 15 * world. For more information visit <http://www.openshot.org/>. 16 * 17 * OpenShot Library (libopenshot) is free software: you can redistribute it 18 * and/or modify it under the terms of the GNU Lesser General Public License 19 * as published by the Free Software Foundation, either version 3 of the 20 * License, or (at your option) any later version. 21 * 22 * OpenShot Library (libopenshot) is distributed in the hope that it will be 23 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 * GNU Lesser General Public License for more details. 26 * 27 * You should have received a copy of the GNU Lesser General Public License 28 * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>. 29 */ 30 31#ifndef OPENSHOT_VERSION_H 32#define OPENSHOT_VERSION_H 33 34#define OPENSHOT_VERSION_ALL "@PROJECT_VERSION@" /// A string of the entire version "Major.Minor.Build" 35#define OPENSHOT_VERSION_FULL "@PROJECT_VERSION_FULL@" /// A string of the full version identifier, including suffixes (e.g. "0.0.0-dev0") 36 37#define OPENSHOT_VERSION_MAJOR_MINOR "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@" /// A string of the "Major.Minor" version 38 39#define OPENSHOT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ /// Major version number is incremented when huge features are added or improved. 40#define OPENSHOT_VERSION_MINOR @PROJECT_VERSION_MINOR@ /// Minor version is incremented when smaller (but still very important) improvements are added. 41#define OPENSHOT_VERSION_BUILD @PROJECT_VERSION_PATCH@ /// Build number is incremented when minor bug fixes and less important improvements are added. 42 43#define OPENSHOT_VERSION_SO @PROJECT_SO_VERSION@ /// Shared object version number. This increments any time the API and ABI changes (so old apps will no longer link) 44 45// Useful dependency versioning / feature availability 46#cmakedefine QT_VERSION_STR "@QT_VERSION_STR@" 47#cmakedefine AVCODEC_VERSION_STR "@AVCODEC_VERSION_STR@" 48#cmakedefine AVFORMAT_VERSION_STR "@AVFORMAT_VERSION_STR@" 49#cmakedefine AVUTIL_VERSION_STR "@AVUTIL_VERSION_STR@" 50#cmakedefine OPENCV_VERSION_STR "@OPENCV_VERSION_STR@" 51#cmakedefine01 HAVE_IMAGEMAGICK 52#cmakedefine01 HAVE_RESVG 53#cmakedefine01 HAVE_OPENCV 54#cmakedefine01 FFMPEG_USE_SWRESAMPLE 55#cmakedefine01 APPIMAGE_BUILD 56 57#include <sstream> 58 59namespace openshot 60{ 61 /// This struct holds version number information. Use the GetVersion() method to access the current version of libopenshot. 62 struct OpenShotVersion { 63 static const int Major = OPENSHOT_VERSION_MAJOR; /// Major version number 64 static const int Minor = OPENSHOT_VERSION_MINOR; /// Minor version number 65 static const int Build = OPENSHOT_VERSION_BUILD; /// Build number 66 static const int So = OPENSHOT_VERSION_SO; /// Shared Object Number (incremented when API or ABI changes) 67 68 /// Get a string version of the version (i.e. "Major.Minor.Build") 69 inline static const std::string ToString() { 70 std::stringstream version_string; 71 version_string << Major << "." << Minor << "." << Build; 72 return version_string.str(); 73 } 74 }; 75 76 static const openshot::OpenShotVersion Version; 77 78 /// Get the current version number of libopenshot (major, minor, and build number) 79 openshot::OpenShotVersion GetVersion(); 80} 81 82#endif // OPENSHOT_VERSION_H 83