<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!-- A target to build tsduck.jar (Java bindings) -->

  <ItemGroup>
    <JavaSources Include="$(TSDuckRootDir)src\libtsduck\**\*.java;"/>
  </ItemGroup>

  <Target Name="BuildTSDuckJar"
          Inputs="@(JavaSources);$(TSDuckRootDir)src\libtsduck\tsVersion.h"
          Outputs="$(TSDuckRootDir)bin\java\tsduck.jar">
	<Message Text="Building $(TSDuckRootDir)bin\java\tsduck.jar" Importance="high"/>
    <Exec ConsoleToMSBuild='true'
          Command='PowerShell "$(TSDuckRootDir)scripts\build-java.ps1" -NoPause'>
      <Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec"/>
    </Exec>
  </Target>

</Project>
