ezEngine  Milestone 7
DetectPlatform.h
1 #pragma once
2 
3 #if defined(_WINDOWS)
4  #undef EZ_PLATFORM_WINDOWS
5  #define EZ_PLATFORM_WINDOWS EZ_ON
6 
7 #elif defined(__APPLE__) && defined(__MACH__)
8  #include <TargetConditionals.h>
9 
10  #if TARGET_OS_MAC == 1
11  #undef EZ_PLATFORM_OSX
12  #define EZ_PLATFORM_OSX EZ_ON
13  #elif TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1
14  #undef EZ_PLATFORM_IOS
15  #define EZ_PLATFORM_IOS EZ_ON
16  #endif
17 
18 #elif defined(__linux)
19 
20  #undef EZ_PLATFORM_LINUX
21  #define EZ_PLATFORM_LINUX EZ_ON
22 
23 //#elif defined(...)
24 // #undef EZ_PLATFORM_LINUX
25 // #define EZ_PLATFORM_LINUX EZ_ON
26 #else
27  #error "Unknown Platform."
28 #endif
29