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/genproj.cs
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/genproj.cs')
-rw-r--r--msvc/scripts/genproj.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs
index bf450539688..378d1c00db7 100644
--- a/msvc/scripts/genproj.cs
+++ b/msvc/scripts/genproj.cs
@@ -900,6 +900,12 @@ class MsbuildGenerator {
else
build_output_dir = "bin\\Debug\\" + library;
+ if (build_output_dir.Contains ("-linux") || build_output_dir.Contains ("-darwin") || build_output_dir.Contains ("-win32"))
+ build_output_dir = build_output_dir
+ .Replace ("-linux", "-$(HostPlatform)")
+ .Replace ("-darwin", "-$(HostPlatform)")
+ .Replace ("-win32", "-$(HostPlatform)");
+
bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build"));
//