Skip to content

Commit

Permalink
drop back export.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jian-dong committed Dec 2, 2024
1 parent 52ebce8 commit 7fe9b6e
Showing 1 changed file with 42 additions and 21 deletions.
63 changes: 42 additions & 21 deletions sdk/include/libobsensor/h/Export.h
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 */

0 comments on commit 7fe9b6e

Please sign in to comment.