49 lines
1.4 KiB
C
49 lines
1.4 KiB
C
|
#ifndef MYNTEYE_MYNTEYE_H_
|
||
|
#define MYNTEYE_MYNTEYE_H_
|
||
|
#pragma once
|
||
|
|
||
|
#include "mynteye/global.h"
|
||
|
|
||
|
#ifdef DOXYGEN_WORKING
|
||
|
# define MYNTEYE_API
|
||
|
#else
|
||
|
# ifdef MYNTEYE_EXPORTS
|
||
|
# define MYNTEYE_API DECL_EXPORT
|
||
|
# else
|
||
|
# define MYNTEYE_API DECL_IMPORT
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
#define MYNTEYE_API_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||
|
#define MYNTEYE_API_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||
|
#define MYNTEYE_API_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||
|
|
||
|
/* MYNTEYE_API_VERSION is (major << 16) + (minor << 8) + patch */
|
||
|
#define MYNTEYE_API_VERSION \
|
||
|
MYNTEYE_API_VERSION_CHECK( \
|
||
|
MYNTEYE_API_VERSION_MAJOR, \
|
||
|
MYNTEYE_API_VERSION_MINOR, \
|
||
|
MYNTEYE_API_VERSION_PATCH \
|
||
|
)
|
||
|
|
||
|
/* Can be used like
|
||
|
* #if (MYNTEYE_API_VERSION >= MYNTEYE_API_VERSION_CHECK(2, 0, 0)) */
|
||
|
#define MYNTEYE_API_VERSION_CHECK(major, minor, patch) \
|
||
|
((major<<16)|(minor<<8)|(patch)) // NOLINT
|
||
|
|
||
|
/* MYNTEYE_API_VERSION in "X.Y.Z" format */
|
||
|
#define MYNTEYE_API_VERSION_STR (STRINGIFY(MYNTEYE_API_VERSION_MAJOR.MYNTEYE_API_VERSION_MINOR.MYNTEYE_API_VERSION_PATCH)) // NOLINT
|
||
|
|
||
|
#cmakedefine MYNTEYE_NAMESPACE @MYNTEYE_NAMESPACE@
|
||
|
#if defined(MYNTEYE_NAMESPACE)
|
||
|
# define MYNTEYE_BEGIN_NAMESPACE namespace MYNTEYE_NAMESPACE {
|
||
|
# define MYNTEYE_END_NAMESPACE }
|
||
|
# define MYNTEYE_USE_NAMESPACE using namespace ::MYNTEYE_NAMESPACE; // NOLINT
|
||
|
#else
|
||
|
# define MYNTEYE_BEGIN_NAMESPACE
|
||
|
# define MYNTEYE_END_NAMESPACE
|
||
|
# define MYNTEYE_USE_NAMESPACE
|
||
|
#endif
|
||
|
|
||
|
#endif // MYNTEYE_MYNTEYE_H_
|