libopenmpt_version.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * libopenmpt_version.h
  3. * --------------------
  4. * Purpose: libopenmpt public interface version
  5. * Notes : (currently none)
  6. * Authors: OpenMPT Devs
  7. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  8. */
  9. #ifndef LIBOPENMPT_VERSION_H
  10. #define LIBOPENMPT_VERSION_H
  11. /* clang-format off */
  12. /*! \addtogroup libopenmpt
  13. @{
  14. */
  15. /*! \brief libopenmpt major version number */
  16. #define OPENMPT_API_VERSION_MAJOR 0
  17. /*! \brief libopenmpt minor version number */
  18. #define OPENMPT_API_VERSION_MINOR 6
  19. /*! \brief libopenmpt patch version number */
  20. #define OPENMPT_API_VERSION_PATCH 6
  21. /*! \brief libopenmpt pre-release tag */
  22. #define OPENMPT_API_VERSION_PREREL ""
  23. /*! \brief libopenmpt pre-release flag */
  24. #define OPENMPT_API_VERSION_IS_PREREL 0
  25. /*! \brief libopenmpt version number as a single integer value
  26. * \since 0.3
  27. * \remarks Use the following shim if you need to support earlier libopenmpt versions:
  28. * \code
  29. * #include <libopenmpt/libopenmpt_version.h>
  30. * #if !defined(OPENMPT_API_VERSION_MAKE)
  31. * #define OPENMPT_API_VERSION_MAKE(major, minor, patch) (((major)<<24)|((minor)<<16)|((patch)<<0))
  32. * #endif
  33. * \endcode
  34. */
  35. #define OPENMPT_API_VERSION_MAKE(major, minor, patch) (((major)<<24)|((minor)<<16)|((patch)<<0))
  36. /*! \brief libopenmpt API version number */
  37. #define OPENMPT_API_VERSION OPENMPT_API_VERSION_MAKE(OPENMPT_API_VERSION_MAJOR, OPENMPT_API_VERSION_MINOR, OPENMPT_API_VERSION_PATCH)
  38. /*! \brief Check whether the libopenmpt API is at least the provided version
  39. * \since 0.3
  40. * \remarks Use the following shim if you need to support earlier libopenmpt versions:
  41. * \code
  42. * #include <libopenmpt/libopenmpt_version.h>
  43. * #if !defined(OPENMPT_API_VERSION_AT_LEAST)
  44. * #define OPENMPT_API_VERSION_AT_LEAST(major, minor, patch) (OPENMPT_API_VERSION >= OPENMPT_API_VERSION_MAKE((major), (minor), (patch)))
  45. * #endif
  46. * \endcode
  47. */
  48. #define OPENMPT_API_VERSION_AT_LEAST(major, minor, patch) (OPENMPT_API_VERSION >= OPENMPT_API_VERSION_MAKE((major), (minor), (patch)))
  49. /*! \brief Check whether the libopenmpt API is before the provided version
  50. * \since 0.3
  51. * \remarks Use the following shim if you need to support earlier libopenmpt versions:
  52. * \code
  53. * #include <libopenmpt/libopenmpt_version.h>
  54. * #if !defined(OPENMPT_API_VERSION_BEFORE)
  55. * #define OPENMPT_API_VERSION_BEFORE(major, minor, patch) (OPENMPT_API_VERSION < OPENMPT_API_VERSION_MAKE((major), (minor), (patch)))
  56. * #endif
  57. * \endcode
  58. */
  59. #define OPENMPT_API_VERSION_BEFORE(major, minor, patch) (OPENMPT_API_VERSION < OPENMPT_API_VERSION_MAKE((major), (minor), (patch)))
  60. #define OPENMPT_API_VERSION_HELPER_STRINGIZE(x) #x
  61. #define OPENMPT_API_VERSION_STRINGIZE(x) OPENMPT_API_VERSION_HELPER_STRINGIZE(x)
  62. #define OPENMPT_API_VERSION_STRING OPENMPT_API_VERSION_STRINGIZE(OPENMPT_API_VERSION_MAJOR) "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_API_VERSION_MINOR) "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_API_VERSION_PATCH) OPENMPT_API_VERSION_PREREL
  63. /*!
  64. @}
  65. */
  66. /* clang-format on */
  67. #endif /* LIBOPENMPT_VERSION_H */