-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
16 lines (16 loc) · 1001 Bytes
/
Directory.Build.props
File metadata and controls
16 lines (16 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<Project>
<!--
Global build properties for all projects in the solution.
This file is automatically imported by all .csproj files.
-->
<PropertyGroup>
<!-- Enable C# preview features (null conditional assignment, field keyword, etc.) -->
<LangVersion>preview</LangVersion>
<!-- Use system protoc on Apple Silicon (ARM64) to avoid "Bad CPU type" error -->
<!-- This works for macOS with Homebrew-installed protoc -->
<Protobuf_Protoc Condition="'$(OS)' == 'Unix' And Exists('/opt/homebrew/bin/protoc')">/opt/homebrew/bin/protoc</Protobuf_Protoc>
<!-- Fallback for Linux or other Unix systems with protoc in standard locations -->
<Protobuf_Protoc Condition="'$(OS)' == 'Unix' And '$(Protobuf_Protoc)' == '' And Exists('/usr/local/bin/protoc')">/usr/local/bin/protoc</Protobuf_Protoc>
<Protobuf_Protoc Condition="'$(OS)' == 'Unix' And '$(Protobuf_Protoc)' == '' And Exists('/usr/bin/protoc')">/usr/bin/protoc</Protobuf_Protoc>
</PropertyGroup>
</Project>