NIM PC Cross Platform SDK
nim_build_config.h
Go to the documentation of this file.
1
8#ifndef NIM_SDK_UTIL_NIM_BUILD_CONFIG_H_
9#define NIM_SDK_UTIL_NIM_BUILD_CONFIG_H_
10
11#if !defined(__GNUC__) && defined(NIM_SDK_EXPORTS)
12#define NIM_SDK_DLL_API __declspec(dllexport)
13#elif !defined(__GNUC__) && !defined(NIM_SDK_EXPORTS)
14#define NIM_SDK_DLL_API __declspec(dllimport)
15#elif defined(__GNUC__) && defined(NIM_SDK_EXPORTS)
16#define NIM_SDK_DLL_API __attribute__((visibility("default")))
17#else
18#define NIM_SDK_DLL_API
19#endif
20
21// Windows or Unix-like(POSIX) macro definition.
22#if defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE)
23#define NIMAPI_UNDER_WINDOWS 1
24#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
25#define NIMAPI_UNDER_WINDOWS_RT 1
26#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
27#define NIMAPI_UNDER_WINDOWS_PHONE 1
28#endif
29#endif
30#else
31#define NIMAPI_UNDER_POSIX 1
32#endif
33
34// OS X or iOS macro definition.
35#if defined(__APPLE__)
36#define NIMAPI_UNDER_APPLE 1
37#endif
38#if TARGET_OS_MAC
39#define NIMAPI_UNDER_MAC 1
40#endif
41#if TARGET_OS_IPHONE
42#define NIMAPI_UNDER_IPHONE 1
43#endif
44#if TARGET_IPHONE_SIMULATOR
45#define NIMAPI_UNDER_IPHONE_SIMULATOR 1
46#endif
47
48// NIM SDK (Universal SDK or Windows desktop-only SDK) API target platform macro definition.
49#if defined(NIM_WIN_DESKTOP_ONLY_SDK) && (defined(NIMAPI_UNDER_WINDOWS))
50#define NIMAPI_UNDER_WIN_DESKTOP_ONLY 1
51#else
52#define NIMAPI_UNDER_UNIVERSAL 1 // Also support Windows desktop
53#endif
54
55#endif /* NIM_SDK_UTIL_NIM_BUILD_CONFIG_H_ */