OSVR-Core
WindowsVariantC.h
Go to the documentation of this file.
1 
14 /*
15 // Copyright 2015 Sensics, Inc.
16 //
17 // Licensed under the Apache License, Version 2.0 (the "License");
18 // you may not use this file except in compliance with the License.
19 // You may obtain a copy of the License at
20 //
21 // http://www.apache.org/licenses/LICENSE-2.0
22 //
23 // Unless required by applicable law or agreed to in writing, software
24 // distributed under the License is distributed on an "AS IS" BASIS,
25 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 // See the License for the specific language governing permissions and
27 // limitations under the License.
28 */
29 
30 #ifndef INCLUDED_WindowsVariantC_h_GUID_968C6480_6D3E_4DA3_87C7_C5C2F8E4E4BA
31 #define INCLUDED_WindowsVariantC_h_GUID_968C6480_6D3E_4DA3_87C7_C5C2F8E4E4BA
32 
33 /* Internal Includes */
34 #include <osvr/Util/PlatformConfig.h>
35 
36 /* Library/third-party includes */
37 /* none */
38 
39 /* Standard includes */
40 /* none */
41 
42 #ifdef OSVR_WINDOWS
43 
44 /* Visual Studio 2012 or newer, not using the vXX0_xp toolset*/
45 #if defined(_MSC_VER) && (_MSC_VER >= 1700) && \
46  (!defined(_USING_V110_SDK71_) || !_USING_V110_SDK71_)
47 #include <winapifamily.h>
48 
49 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
50 /* Windows desktop */
51 #define OSVR_WINDOWS_DESKTOP
52 #define OSVR_WINDOWS_PARTITION_KNOWN
53 
54 #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
55 /* Windows RT/Modern SDK/Store apps */
56 #define OSVR_WINDOWS_STORE
57 #define OSVR_WINDOWS_PARTITION_KNOWN
58 
59 #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
60 /* Windows Phone */
61 #define OSVR_WINDOWS_PHONE
62 #define OSVR_WINDOWS_PARTITION_KNOWN
63 #endif
64 
65 #endif /* new msvc */
66 
67 #ifndef OSVR_WINDOWS_PARTITION_KNOWN
68 /* Fallback: assume Windows desktop */
69 #define OSVR_WINDOWS_DESKTOP
70 #endif
71 
72 #endif /* OSVR_WINDOWS */
73 
74 #endif