Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-05-13 18:26:35 +0300
committerGitHub <noreply@github.com>2017-05-13 18:26:35 +0300
commit291a32febcc78ff5b9c01fd9da7c5ef776795523 (patch)
tree7fd0b011687e06e304bc9a37c385e7d51c0fa49d /msvc/scripts/csproj.tmpl
parent62bc1b229ee0501b706f3ea39524180c0ae7fc26 (diff)
[csproj] Update generator to handle platform-specific assemblies (#4847)
After https://github.com/mono/mono/pull/4837 was merged the csproj update bot started sending PRs which hardcoded net_4_x-linux as the OutputPath. Updated the csproj generator to detect this and use a variable in the OutputPath instead. It'll autodetect based on the current OS and can be overriden by passing /p:HostPlatform=foobar to msbuild. Ideally we'd have configurations for each platform in the csproj since in the future the file lists will be different but this is a first step.
Diffstat (limited to 'msvc/scripts/csproj.tmpl')
-rw-r--r--msvc/scripts/csproj.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/msvc/scripts/csproj.tmpl b/msvc/scripts/csproj.tmpl
index 4c7e1dba137..1b2e850e5e3 100644
--- a/msvc/scripts/csproj.tmpl
+++ b/msvc/scripts/csproj.tmpl
@@ -9,6 +9,9 @@
<ProjectGuid>@PROJECTGUID@</ProjectGuid>
<OutputType>@OUTPUTTYPE@</OutputType>
<NoWarn>@DISABLEDWARNINGS@</NoWarn>
+ <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
+ <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
+ <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
<OutputPath>@OUTPUTDIR@</OutputPath>
<IntermediateOutputPath>obj-@OUTPUTSUFFIX@</IntermediateOutputPath>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>