Skip to content

Commit

Permalink
Merge pull request #260 from portyanikhin/update-targets
Browse files Browse the repository at this point in the history
Updated targets
  • Loading branch information
portyanikhin committed Jan 18, 2024
2 parents cfb06b4 + fddc7fa commit a5b384e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
24 changes: 18 additions & 6 deletions src/SharpProp/SharpProp.csproj
Expand Up @@ -9,22 +9,34 @@

<ItemGroup>
<None Include="SharpProp.targets" Pack="true" Visible="false" PackagePath="build\"/>
<None Include="libCoolProp.dll" Pack="true" Visible="false" PackagePath="build\"/>
<None Include="libCoolProp.dylib" Pack="true" Visible="false" PackagePath="build\"/>
<None Include="libCoolProp.so" Pack="true" Visible="false" PackagePath="build\"/>
<None Update="libCoolProp.dll">
<None Include="libCoolProp.dll" Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<Pack>true</Pack>
<Visible>false</Visible>
<PackagePath>build\</PackagePath>
</None>
<None Update="libCoolProp.dll" Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>true</Pack>
<Visible>false</Visible>
<PackagePath>build\</PackagePath>
</None>
<None Update="libCoolProp.dylib">
<None Include="libCoolProp.dylib" Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<Pack>true</Pack>
<Visible>false</Visible>
<PackagePath>build\</PackagePath>
</None>
<None Update="libCoolProp.dylib" Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>true</Pack>
<Visible>false</Visible>
<PackagePath>build\</PackagePath>
</None>
<None Update="libCoolProp.so">
<None Include="libCoolProp.so" Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<Pack>true</Pack>
<Visible>false</Visible>
<PackagePath>build\</PackagePath>
</None>
<None Update="libCoolProp.so" Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>true</Pack>
<Visible>false</Visible>
Expand Down
6 changes: 3 additions & 3 deletions src/SharpProp/SharpProp.targets
@@ -1,8 +1,8 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dll"/>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dylib"/>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.so"/>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dll" Condition="$([MSBuild]::IsOSPlatform('Windows'))"/>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dylib" Condition="$([MSBuild]::IsOSPlatform('OSX'))"/>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.so" Condition="$([MSBuild]::IsOSPlatform('Linux'))"/>
<None Include="@(NativeLibs)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
8 changes: 4 additions & 4 deletions tests/Directory.Build.props
Expand Up @@ -8,12 +8,12 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<TargetFrameworks>net48;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFrameworks>net48;net6.0;net8.0</TargetFrameworks>
<PropertyGroup Condition="!$([MSBuild]::IsOSPlatform('Windows'))">
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

</Project>

0 comments on commit a5b384e

Please sign in to comment.