|
54 | 54 |
|
55 | 55 | <!-- Native libraries for Windows --> |
56 | 56 | <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))"> |
57 | | - <Content Include="runtimes\win-x64\native\$(PgQueryWrapperWin)"> |
| 57 | + <Content Include="runtimes\win-x64\native\$(PgQueryWrapperWin)" Condition="Exists('runtimes\win-x64\native\$(PgQueryWrapperWin)')"> |
58 | 58 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
59 | 59 | <PackagePath>runtimes\win-x64\native\$(PgQueryWrapperWin)</PackagePath> |
60 | 60 | <Pack>true</Pack> |
61 | 61 | </Content> |
62 | | - <Content Include="runtimes\win-x86\native\$(PgQueryWrapperWin)"> |
| 62 | + <Content Include="runtimes\win-x86\native\$(PgQueryWrapperWin)" Condition="Exists('runtimes\win-x86\native\$(PgQueryWrapperWin)')"> |
63 | 63 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
64 | 64 | <PackagePath>runtimes\win-x86\native\$(PgQueryWrapperWin)</PackagePath> |
65 | 65 | <Pack>true</Pack> |
66 | 66 | </Content> |
67 | | - <Content Include="runtimes\win-arm64\native\$(PgQueryWrapperWin)"> |
| 67 | + <Content Include="runtimes\win-arm64\native\$(PgQueryWrapperWin)" Condition="Exists('runtimes\win-arm64\native\$(PgQueryWrapperWin)')"> |
68 | 68 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
69 | 69 | <PackagePath>runtimes\win-arm64\native\$(PgQueryWrapperWin)</PackagePath> |
70 | 70 | <Pack>true</Pack> |
71 | 71 | </Content> |
72 | 72 |
|
73 | 73 | <!-- Fallback: Copy wrapper library directly to output directory for better compatibility --> |
74 | | - <Content Include="runtimes\win-x64\native\$(PgQueryWrapperWin)"> |
| 74 | + <Content Include="runtimes\win-x64\native\$(PgQueryWrapperWin)" Condition="Exists('runtimes\win-x64\native\$(PgQueryWrapperWin)')"> |
75 | 75 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
76 | 76 | <Link>$(PgQueryWrapperWin)</Link> |
77 | 77 | </Content> |
78 | 78 | </ItemGroup> |
79 | 79 |
|
80 | 80 | <!-- Native libraries for Linux --> |
81 | 81 | <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))"> |
82 | | - <Content Include="runtimes\linux-x64\native\$(PgQueryWrapperLinux)"> |
| 82 | + <Content Include="runtimes\linux-x64\native\$(PgQueryWrapperLinux)" Condition="Exists('runtimes\linux-x64\native\$(PgQueryWrapperLinux)')"> |
83 | 83 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
84 | 84 | <PackagePath>runtimes\linux-x64\native\$(PgQueryWrapperLinux)</PackagePath> |
85 | 85 | <Pack>true</Pack> |
86 | 86 | </Content> |
87 | | - <Content Include="runtimes\linux-arm64\native\$(PgQueryWrapperLinux)"> |
| 87 | + <Content Include="runtimes\linux-arm64\native\$(PgQueryWrapperLinux)" Condition="Exists('runtimes\linux-arm64\native\$(PgQueryWrapperLinux)')"> |
88 | 88 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
89 | 89 | <PackagePath>runtimes\linux-arm64\native\$(PgQueryWrapperLinux)</PackagePath> |
90 | 90 | <Pack>true</Pack> |
91 | 91 | </Content> |
92 | 92 |
|
93 | 93 | <!-- Fallback: Copy wrapper library directly to output directory for better compatibility --> |
94 | | - <Content Include="runtimes\linux-x64\native\$(PgQueryWrapperLinux)"> |
| 94 | + <Content Include="runtimes\linux-x64\native\$(PgQueryWrapperLinux)" Condition="Exists('runtimes\linux-x64\native\$(PgQueryWrapperLinux)')"> |
95 | 95 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
96 | 96 | <Link>$(PgQueryWrapperLinux)</Link> |
97 | 97 | </Content> |
98 | 98 | </ItemGroup> |
99 | 99 |
|
100 | 100 | <!-- Native libraries for macOS --> |
101 | 101 | <ItemGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))"> |
102 | | - <Content Include="runtimes\osx-x64\native\$(PgQueryWrapperMac)"> |
| 102 | + <Content Include="runtimes\osx-x64\native\$(PgQueryWrapperMac)" Condition="Exists('runtimes\osx-x64\native\$(PgQueryWrapperMac)')"> |
103 | 103 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
104 | 104 | <PackagePath>runtimes\osx-x64\native\$(PgQueryWrapperMac)</PackagePath> |
105 | 105 | <Pack>true</Pack> |
106 | 106 | </Content> |
107 | | - <Content Include="runtimes\osx-arm64\native\$(PgQueryWrapperMac)"> |
| 107 | + <Content Include="runtimes\osx-arm64\native\$(PgQueryWrapperMac)" Condition="Exists('runtimes\osx-arm64\native\$(PgQueryWrapperMac)')"> |
108 | 108 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
109 | 109 | <PackagePath>runtimes\osx-arm64\native\$(PgQueryWrapperMac)</PackagePath> |
110 | 110 | <Pack>true</Pack> |
111 | 111 | </Content> |
112 | 112 |
|
113 | 113 | <!-- Fallback: Copy wrapper library directly to output directory for better compatibility --> |
114 | | - <Content Include="runtimes\osx-arm64\native\$(PgQueryWrapperMac)"> |
| 114 | + <Content Include="runtimes\osx-arm64\native\$(PgQueryWrapperMac)" Condition="Exists('runtimes\osx-arm64\native\$(PgQueryWrapperMac)')"> |
115 | 115 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
116 | 116 | <Link>$(PgQueryWrapperMac)</Link> |
117 | 117 | </Content> |
|
0 commit comments