Skip to content

Commit

Permalink
Add libmympdclient version
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Jul 17, 2021
1 parent 1ab0516 commit e383cb7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/mpd/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "entity.h"
#include "fingerprint.h"
#include "idle.h"
#include "libmympdclient_version.h"
#include "list.h"
#include "message.h"
#include "mixer.h"
Expand Down
35 changes: 35 additions & 0 deletions include/mpd/libmympdclient_version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
SPDX-License-Identifier: GPL-2.0-or-later
myMPD (c) 2018-2019 Juergen Mang <[email protected]>
https://github.com/jcorporation/libmpdclient
*/

/*! \file
* patched libmpdclient library for usage in myMPD
*
* Do not include this header directly. Use mpd/client.h instead.
*/

#ifndef LIBMYMPDCLIENT_VERSION_H
#define LIBMYMPDCLIENT_VERSION_H

#define LIBMYMPDCLIENT_MAJOR_VERSION 1
#define LIBMYMPDCLIENT_MINOR_VERSION 0
#define LIBMYMPDCLIENT_PATCH_VERSION 5

/**
* Preprocessor macro which allows you to check which version of
* libmpdclient you are compiling with. It can be used in
* preprocessor directives.
*
* @return true if this libmympdclient version equals or is newer than
* the specified version number
*/
#define LIBMYMPDCLIENT_CHECK_VERSION(major, minor, patch) \
((major) < LIBMYMPDCLIENT_MAJOR_VERSION || \
((major) == LIBMYMPDCLIENT_MAJOR_VERSION && \
((minor) < LIBMYMPDCLIENT_MINOR_VERSION || \
((minor) == LIBMYMPDCLIENT_MINOR_VERSION && \
(patch) <= LIBMYMPDCLIENT_PATCH_VERSION))))

#endif
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ install_headers(
'include/mpd/error.h',
'include/mpd/fingerprint.h',
'include/mpd/idle.h',
'include/mpd/libmympdclient_version.h',
'include/mpd/list.h',
'include/mpd/mixer.h',
'include/mpd/mount.h',
Expand Down

0 comments on commit e383cb7

Please sign in to comment.