-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,64 @@ | ||
|
||
#ifndef OB_EXPORT_H | ||
#define OB_EXPORT_H | ||
|
||
#ifdef OB_STATIC_DEFINE | ||
# define OB_EXPORT | ||
# define OB_NO_EXPORT | ||
#define OB_EXPORT | ||
#define OB_NO_EXPORT | ||
#else | ||
#ifdef _WIN32 | ||
/* Windows platform */ | ||
#ifndef OB_EXPORT | ||
#ifdef OrbbecSDK_EXPORTS | ||
/* We are building this library */ | ||
#define OB_EXPORT __declspec(dllexport) | ||
#else | ||
# ifndef OB_EXPORT | ||
# ifdef OrbbecSDK_EXPORTS | ||
/* We are building this library */ | ||
# define OB_EXPORT __attribute__((visibility("default"))) | ||
# else | ||
/* We are using this library */ | ||
# define OB_EXPORT __attribute__((visibility("default"))) | ||
# endif | ||
# endif | ||
/* We are using this library */ | ||
#define OB_EXPORT __declspec(dllimport) | ||
#endif | ||
#endif | ||
|
||
# ifndef OB_NO_EXPORT | ||
# define OB_NO_EXPORT __attribute__((visibility("hidden"))) | ||
# endif | ||
#ifndef OB_NO_EXPORT | ||
#define OB_NO_EXPORT | ||
#endif | ||
#else | ||
/* Unix-like platforms (Linux, macOS, etc.) */ | ||
#ifndef OB_EXPORT | ||
#ifdef OrbbecSDK_EXPORTS | ||
/* We are building this library */ | ||
#define OB_EXPORT __attribute__((visibility("default"))) | ||
#else | ||
/* We are using this library */ | ||
#define OB_EXPORT __attribute__((visibility("default"))) | ||
#endif | ||
#endif | ||
|
||
#ifndef OB_NO_EXPORT | ||
#define OB_NO_EXPORT __attribute__((visibility("hidden"))) | ||
#endif | ||
#endif | ||
#endif | ||
|
||
#ifndef OB_DEPRECATED | ||
# define OB_DEPRECATED __attribute__ ((__deprecated__)) | ||
#ifdef _WIN32 | ||
#define OB_DEPRECATED __declspec(deprecated) | ||
#else | ||
#define OB_DEPRECATED __attribute__((__deprecated__)) | ||
#endif | ||
#endif | ||
|
||
#ifndef OB_DEPRECATED_EXPORT | ||
# define OB_DEPRECATED_EXPORT OB_EXPORT OB_DEPRECATED | ||
#define OB_DEPRECATED_EXPORT OB_EXPORT OB_DEPRECATED | ||
#endif | ||
|
||
#ifndef OB_DEPRECATED_NO_EXPORT | ||
# define OB_DEPRECATED_NO_EXPORT OB_NO_EXPORT OB_DEPRECATED | ||
#define OB_DEPRECATED_NO_EXPORT OB_NO_EXPORT OB_DEPRECATED | ||
#endif | ||
|
||
/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ | ||
#if 0 /* DEFINE_NO_DEPRECATED */ | ||
# ifndef OB_NO_DEPRECATED | ||
# define OB_NO_DEPRECATED | ||
# endif | ||
#ifndef OB_NO_DEPRECATED | ||
#define OB_NO_DEPRECATED | ||
#endif | ||
#endif | ||
|
||
#endif /* OB_EXPORT_H */ |