|
45 | 45 | <ItemGroup> |
46 | 46 | <None Pack="true" Include="buildTransitive/Flecs.NET.Native.props" PackagePath="buildTransitive/$(PackageId).props"/> |
47 | 47 | <None Pack="true" Include="buildTransitive/Flecs.NET.Native.targets" PackagePath="buildTransitive/$(PackageId).targets"/> |
48 | | - <None Pack="true" Include="$(OutputPath)runtimes/**/*.a;$(OutputPath)runtimes/**/*.lib" PackagePath="static/" /> |
| 48 | + <None Pack="true" Include="$(OutputPath)runtimes/**/*.a;$(OutputPath)runtimes/**/*.lib" PackagePath="static/"/> |
49 | 49 |
|
50 | | - <Content Include="$(OutputPath)runtimes/**/**" Exclude="$(OutputPath)runtimes/**/*.a;$(OutputPath)runtimes/**/*.lib" Link="%(Filename)%(Extension)" > |
| 50 | + <Content Include="$(OutputPath)runtimes/**/**" Exclude="$(OutputPath)runtimes/**/*.a;$(OutputPath)runtimes/**/*.lib" Link="%(Filename)%(Extension)"> |
51 | 51 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
52 | 52 | <PackagePath>runtimes/</PackagePath> |
53 | 53 | </Content> |
|
58 | 58 | <When Condition="$(RuntimeIdentifier) == 'win-x64'"> |
59 | 59 | <PropertyGroup> |
60 | 60 | <ZigIdentifier>x86_64-windows-gnu</ZigIdentifier> |
| 61 | + <ZigLibraryType>Shared</ZigLibraryType> |
61 | 62 | </PropertyGroup> |
62 | 63 | </When> |
63 | 64 | <When Condition="$(RuntimeIdentifier) == 'win-x86'"> |
64 | 65 | <PropertyGroup> |
65 | 66 | <ZigIdentifier>x86-windows-gnu</ZigIdentifier> |
| 67 | + <ZigLibraryType>Shared</ZigLibraryType> |
66 | 68 | </PropertyGroup> |
67 | 69 | </When> |
68 | 70 | <When Condition="$(RuntimeIdentifier) == 'win-arm'"> |
69 | 71 | <PropertyGroup> |
70 | 72 | <ZigIdentifier>arm-windows-gnu</ZigIdentifier> |
| 73 | + <ZigLibraryType>Shared</ZigLibraryType> |
71 | 74 | </PropertyGroup> |
72 | 75 | </When> |
73 | 76 | <When Condition="$(RuntimeIdentifier) == 'win-arm64'"> |
74 | 77 | <PropertyGroup> |
75 | 78 | <ZigIdentifier>aarch64-windows-gnu</ZigIdentifier> |
| 79 | + <ZigLibraryType>Shared</ZigLibraryType> |
76 | 80 | </PropertyGroup> |
77 | 81 | </When> |
78 | 82 | <When Condition="$(RuntimeIdentifier) == 'linux-x64'"> |
79 | 83 | <PropertyGroup> |
80 | 84 | <ZigIdentifier>x86_64-linux-gnu</ZigIdentifier> |
| 85 | + <ZigLibraryType>Shared</ZigLibraryType> |
81 | 86 | </PropertyGroup> |
82 | 87 | </When> |
83 | 88 | <When Condition="$(RuntimeIdentifier) == 'linux-x86'"> |
84 | 89 | <PropertyGroup> |
85 | 90 | <ZigIdentifier>x86-linux-gnu</ZigIdentifier> |
| 91 | + <ZigLibraryType>Shared</ZigLibraryType> |
86 | 92 | </PropertyGroup> |
87 | 93 | </When> |
88 | 94 | <When Condition="$(RuntimeIdentifier) == 'linux-arm'"> |
89 | 95 | <PropertyGroup> |
90 | 96 | <ZigIdentifier>arm-linux-gnueabihf</ZigIdentifier> |
| 97 | + <ZigLibraryType>Shared</ZigLibraryType> |
91 | 98 | </PropertyGroup> |
92 | 99 | </When> |
93 | 100 | <When Condition="$(RuntimeIdentifier) == 'linux-arm64'"> |
94 | 101 | <PropertyGroup> |
95 | 102 | <ZigIdentifier>aarch64-linux-gnu</ZigIdentifier> |
| 103 | + <ZigLibraryType>Shared</ZigLibraryType> |
96 | 104 | </PropertyGroup> |
97 | 105 | </When> |
98 | 106 | <When Condition="$(RuntimeIdentifier) == 'osx-x64'"> |
99 | 107 | <PropertyGroup> |
100 | 108 | <ZigIdentifier>x86_64-macos</ZigIdentifier> |
| 109 | + <ZigLibraryType>Shared</ZigLibraryType> |
101 | 110 | </PropertyGroup> |
102 | 111 | </When> |
103 | 112 | <When Condition="$(RuntimeIdentifier) == 'osx-arm64'"> |
104 | 113 | <PropertyGroup> |
105 | 114 | <ZigIdentifier>aarch64-macos</ZigIdentifier> |
| 115 | + <ZigLibraryType>Shared</ZigLibraryType> |
106 | 116 | </PropertyGroup> |
107 | | - </When> |
| 117 | + </When> |
108 | 118 | <When Condition="$(RuntimeIdentifier) == 'iossimulator-x64'"> |
109 | 119 | <PropertyGroup> |
110 | 120 | <ZigIdentifier>x86_64-ios-simulator</ZigIdentifier> |
| 121 | + <ZigLibraryType>Shared</ZigLibraryType> |
111 | 122 | <ZigArgs>--sysroot $(IOS_SIMULATOR_SDK)</ZigArgs> |
112 | 123 | </PropertyGroup> |
113 | 124 | </When> |
114 | 125 | <When Condition="$(RuntimeIdentifier) == 'iossimulator-arm64'"> |
115 | 126 | <PropertyGroup> |
116 | 127 | <ZigIdentifier>aarch64-ios-simulator</ZigIdentifier> |
| 128 | + <ZigLibraryType>Shared</ZigLibraryType> |
117 | 129 | <ZigArgs>--sysroot $(IOS_SIMULATOR_SDK)</ZigArgs> |
118 | 130 | </PropertyGroup> |
119 | 131 | </When> |
120 | 132 | <When Condition="$(RuntimeIdentifier) == 'ios-arm64'"> |
121 | 133 | <PropertyGroup> |
122 | 134 | <ZigIdentifier>aarch64-ios</ZigIdentifier> |
| 135 | + <ZigLibraryType>Shared</ZigLibraryType> |
123 | 136 | <ZigArgs>--sysroot $(IOS_SDK)</ZigArgs> |
124 | 137 | </PropertyGroup> |
125 | 138 | </When> |
126 | 139 | <When Condition="$(RuntimeIdentifier) == 'browser-wasm'"> |
127 | 140 | <PropertyGroup> |
128 | 141 | <ZigIdentifier>wasm32-emscripten</ZigIdentifier> |
| 142 | + <ZigLibraryType>Static</ZigLibraryType> |
129 | 143 | <ZigArgs>--sysroot "$(EMSDK)/upstream/emscripten"</ZigArgs> |
130 | 144 | </PropertyGroup> |
131 | 145 | </When> |
| 146 | + <When Condition="$(RuntimeIdentifier) == 'android-arm64'"> |
| 147 | + <PropertyGroup> |
| 148 | + <ZigIdentifier>aarch64-linux-android</ZigIdentifier> |
| 149 | + <ZigLibraryType>Shared</ZigLibraryType> |
| 150 | + <ZigArgs>--sysroot $(ANDROID_NDK_HOME)</ZigArgs> |
| 151 | + </PropertyGroup> |
| 152 | + </When> |
| 153 | + <When Condition="$(RuntimeIdentifier) == 'android-x64'"> |
| 154 | + <PropertyGroup> |
| 155 | + <ZigIdentifier>x86_64-linux-android</ZigIdentifier> |
| 156 | + <ZigLibraryType>Shared</ZigLibraryType> |
| 157 | + <ZigArgs>--sysroot $(ANDROID_NDK_HOME)</ZigArgs> |
| 158 | + </PropertyGroup> |
| 159 | + </When> |
132 | 160 | <Otherwise> |
133 | 161 | <PropertyGroup> |
134 | 162 | <ZigIdentifier>$(RuntimeIdentifier)</ZigIdentifier> |
|
157 | 185 | <Message Importance="High" Text="Build Target: $(RuntimeIdentifier) $(Configuration)"/> |
158 | 186 | <Message Importance="High" Text="Build Zig Target: $(ZigIdentifier) $(ZigConfiguration)"/> |
159 | 187 | <Message Importance="High" Text="Build Zig Args: $(ZigArgs)"/> |
160 | | - <Exec Command="$(BuildCommand) -Dlibrary-type=Shared" Condition="'$(RuntimeIdentifier)' != 'browser-wasm'"/> |
161 | | - <Exec Command="$(BuildCommand) -Dlibrary-type=Static"/> |
| 188 | + <Exec Command="$(BuildCommand) -Dlibrary-type=$(ZigLibraryType)"/> |
162 | 189 | </Target> |
163 | 190 | </Project> |
0 commit comments