File tree 4 files changed +49
-3
lines changed
4 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 74
74
75
75
#define HC_PLATFORM_IS_MICROSOFT \
76
76
(HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_UWP || HC_PLATFORM == HC_PLATFORM_XDK)
77
+
78
+ #if defined(HC_PLATFORM_MSBUILD_GUESS ) && (HC_PLATFORM_MSBUILD_GUESS != HC_PLATFORM )
79
+ #error The platform guessed by MSBuild does not agree with the platform selected by config.h
80
+ #endif
Original file line number Diff line number Diff line change 11
11
12
12
#include <httpClient/config.h>
13
13
14
- #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_UWP || HC_PLATFORM == HC_PLATFORM_XDK
14
+ #if HC_PLATFORM_IS_MICROSOFT
15
15
16
16
#ifndef WIN32_LEAN_AND_MEAN
17
17
#define WIN32_LEAN_AND_MEAN
Original file line number Diff line number Diff line change 5
5
-->
6
6
<Project ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
7
7
8
+ <Import Project =" $(MSBuildThisFileDirectory)platform_select.props" />
9
+ <PropertyGroup >
10
+ <HCLibPlatformType >$(HCPlatform)</HCLibPlatformType >
11
+ </PropertyGroup >
12
+
8
13
<!-- Valid values for HCLibPlatformType:
9
14
Android
10
15
UWP
17
22
<HCLibPlatformType Condition =" '$(ApplicationType)'=='' AND '$(Platform)'!='Durango'" >Win32</HCLibPlatformType >
18
23
<HCLibPlatformType Condition =" '$(ApplicationType)'=='' AND '$(Platform)'=='Durango'" >XDK</HCLibPlatformType >
19
24
<HCLibPlatformType Condition =" '$(ApplicationType)'=='Android'" >Android</HCLibPlatformType >
20
- </PropertyGroup >
21
-
25
+ </PropertyGroup >
26
+
22
27
<PropertyGroup >
23
28
<useWsppWebsockets >false</useWsppWebsockets >
24
29
<useWsppWebsockets Condition =" '$(HCLibPlatformType)'=='Android'" >true</useWsppWebsockets >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <Project ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3
+ <!-- If the HCPlatform is not set, infer it-->
4
+ <Choose >
5
+ <When Condition =" '$(HCPlatform)'!=''" >
6
+ </When >
7
+ <When Condition =" '$(ApplicationType)'=='Android'" >
8
+ <PropertyGroup >
9
+ <HCPlatform >Android</HCPlatform >
10
+ </PropertyGroup >
11
+ </When >
12
+ <When Condition =" '$(ApplicationType)'=='Windows Store'" >
13
+ <PropertyGroup >
14
+ <HCPlatform >UWP</HCPlatform >
15
+ </PropertyGroup >
16
+ </When >
17
+ <When Condition =" '$(Platform)'=='Durango'" >
18
+ <PropertyGroup >
19
+ <HCPlatform >XDK</HCPlatform >
20
+ </PropertyGroup >
21
+ </When >
22
+ <Otherwise >
23
+ <PropertyGroup >
24
+ <HCPlatform >Win32</HCPlatform >
25
+ </PropertyGroup >
26
+ </Otherwise >
27
+ </Choose >
28
+
29
+ <ItemDefinitionGroup >
30
+ <ClCompile >
31
+ <PreprocessorDefinitions Condition =" '$(HCPlatform)'=='Android'" >%(PreprocessorDefinitions);HC_PLATFORM_MSBUILD_GUESS=HC_PLATFORM_ANDROID</PreprocessorDefinitions >
32
+ <PreprocessorDefinitions Condition =" '$(HCPlatform)'=='UWP'" >%(PreprocessorDefinitions);HC_PLATFORM_MSBUILD_GUESS=HC_PLATFORM_UWP</PreprocessorDefinitions >
33
+ <PreprocessorDefinitions Condition =" '$(HCPlatform)'=='XDK'" >%(PreprocessorDefinitions);HC_PLATFORM_MSBUILD_GUESS=HC_PLATFORM_XDK</PreprocessorDefinitions >
34
+ <PreprocessorDefinitions Condition =" '$(HCPlatform)'=='Win32'" >%(PreprocessorDefinitions);HC_PLATFORM_MSBUILD_GUESS=HC_PLATFORM_WIN32</PreprocessorDefinitions >
35
+ </ClCompile >
36
+ </ItemDefinitionGroup >
37
+ </Project >
You can’t perform that action at this time.
0 commit comments