Plasma Engine  2.0
Loading...
Searching...
No Matches
DetectPlatform.h
1#pragma once
2
3#if defined(_WINDOWS) || defined(_WIN32)
4# undef PL_PLATFORM_WINDOWS
5# define PL_PLATFORM_WINDOWS PL_ON
6
7// further distinction between desktop, UWP etc. is done in Platform_win.h
8
9#elif defined(__APPLE__) && defined(__MACH__)
10# include <TargetConditionals.h>
11
12# if TARGET_OS_MAC == 1
13# undef PL_PLATFORM_OSX
14# define PL_PLATFORM_OSX PL_ON
15# elif TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1
16# undef PL_PLATFORM_IOS
17# define PL_PLATFORM_IOS PL_ON
18# endif
19
20#elif defined(ANDROID)
21
22# undef PL_PLATFORM_ANDROID
23# define PL_PLATFORM_ANDROID PL_ON
24
25#elif defined(__linux)
26
27# undef PL_PLATFORM_LINUX
28# define PL_PLATFORM_LINUX PL_ON
29
30// #elif defined(...)
31// #undef PL_PLATFORM_LINUX
32// #define PL_PLATFORM_LINUX PL_ON
33#else
34# error "Unknown Platform."
35#endif