You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
3.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <PropertyGroup Label="Globals">
  4. <_PropertySheetDisplayName>Libsodium Import Settings</_PropertySheetDisplayName>
  5. </PropertyGroup>
  6. <!-- User Interface -->
  7. <ItemGroup Label="BuildOptionsExtension">
  8. <PropertyPageSchema Include="$(MSBuildThisFileDirectory)libsodium.import.xml" />
  9. </ItemGroup>
  10. <!-- Linkage -->
  11. <ItemDefinitionGroup>
  12. <ClCompile>
  13. <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\..\libsodium\src\libsodium\include;$(ProjectDir)..\..\..\..\..\libsodium\src\libsodium\include\sodium\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  14. <PreprocessorDefinitions Condition="'$(Linkage-libsodium)' == 'static' Or '$(Linkage-libsodium)' == 'ltcg'">SODIUM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  15. </ClCompile>
  16. <Link>
  17. <AdditionalDependencies Condition="'$(Linkage-libsodium)' != ''">advapi32.lib;libsodium.lib;%(AdditionalDependencies)</AdditionalDependencies>
  18. <AdditionalLibraryDirectories Condition="$(Configuration.IndexOf('Debug')) != -1">$(ProjectDir)..\..\..\..\..\libsodium\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libsodium)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  19. <AdditionalLibraryDirectories Condition="$(Configuration.IndexOf('Release')) != -1">$(ProjectDir)..\..\..\..\..\libsodium\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libsodium)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  20. </Link>
  21. </ItemDefinitionGroup>
  22. <!-- Copy -->
  23. <Target Name="Linkage-libsodium-dynamic" AfterTargets="AfterBuild" Condition="'$(Linkage-libsodium)' == 'dynamic'">
  24. <Copy Condition="$(Configuration.IndexOf('Debug')) != -1"
  25. SourceFiles="$(ProjectDir)..\..\..\..\..\libsodium\bin\$(PlatformName)\Debug\$(PlatformToolset)\dynamic\libsodium.dll"
  26. DestinationFiles="$(TargetDir)libsodium.dll"
  27. SkipUnchangedFiles="true" />
  28. <Copy Condition="$(Configuration.IndexOf('Debug')) != -1"
  29. SourceFiles="$(ProjectDir)..\..\..\..\..\libsodium\bin\$(PlatformName)\Debug\$(PlatformToolset)\dynamic\libsodium.pdb"
  30. DestinationFiles="$(TargetDir)libsodium.pdb"
  31. SkipUnchangedFiles="true" />
  32. <Copy Condition="$(Configuration.IndexOf('Release')) != -1"
  33. SourceFiles="$(ProjectDir)..\..\..\..\..\libsodium\bin\$(PlatformName)\Release\$(PlatformToolset)\dynamic\libsodium.dll"
  34. DestinationFiles="$(TargetDir)libsodium.dll"
  35. SkipUnchangedFiles="true" />
  36. </Target>
  37. <!-- Messages -->
  38. <Target Name="libsodium-info" BeforeTargets="AfterBuild" Condition="'$(Linkage-libsodium)' == 'dynamic'">
  39. <Message Text="Copying libsodium.dll -&gt; $(TargetDir)libsodium.dll" Importance="high"/>
  40. <Message Text="Copying libsodium.pdb -&gt; $(TargetDir)libsodium.pdb" Importance="high" Condition="$(Configuration.IndexOf('Debug')) != -1" />
  41. </Target>
  42. </Project>