<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.props" Condition="Exists('..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.props') And '$(ICE_BIN_DIST)' == 'cpp'" />
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{89C40F1A-1761-46C1-B326-5B20BE6F8173}</ProjectGuid>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
    <IceLanguageMapping>matlab</IceLanguageMapping>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <Import Project="$(MSBuildThisFileDirectory)..\..\..\..\cpp\msbuild\ice.cpp11.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <OutDir>..\..\..\lib\$(Platform)\$(Configuration)\</OutDir>
    <TargetExt>.mexw64</TargetExt>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <OutDir>..\..\..\lib\$(Platform)\$(Configuration)\</OutDir>
    <TargetExt>.mexw64</TargetExt>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PreprocessorDefinitions>ICE_MATLAB_API_EXPORTS;MX_COMPAT_32;MATLAB_MEX_FILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(MatlabHome)\extern\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <AdditionalDependencies>libmx.lib;libmex.lib;libmat.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalOptions>/EXPORT:mexFunction %(AdditionalOptions)</AdditionalOptions>
      <AdditionalLibraryDirectories>$(MatlabHome)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <PreprocessorDefinitions>ICE_MATLAB_API_EXPORTS;MX_COMPAT_32;MATLAB_MEX_FILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(MatlabHome)\extern\include;;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <AdditionalDependencies>libmx.lib;libmex.lib;libmat.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalOptions>/EXPORT:mexFunction %(AdditionalOptions)</AdditionalOptions>
      <AdditionalLibraryDirectories>$(MatlabHome)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\..\Communicator.cpp" />
    <ClCompile Include="..\..\Connection.cpp" />
    <ClCompile Include="..\..\Endpoint.cpp" />
    <ClCompile Include="..\..\Future.cpp" />
    <ClCompile Include="..\..\ImplicitContext.cpp" />
    <ClCompile Include="..\..\Init.cpp" />
    <ClCompile Include="..\..\Logger.cpp" />
    <ClCompile Include="..\..\ObjectPrx.cpp" />
    <ClCompile Include="..\..\Properties.cpp" />
    <ClCompile Include="..\..\Util.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\Future.h" />
    <ClInclude Include="..\..\ice.h" />
    <ClInclude Include="..\..\Util.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="..\..\ice.rc" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
    <Import Project="..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.targets" Condition="Exists('..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.targets') And '$(ICE_BIN_DIST)' == 'cpp'" />
  </ImportGroup>
  <Import Project="$(MSBuildThisFileDirectory)..\..\..\..\cpp\msbuild\ice.sign.targets" />
  <PropertyGroup>
    <DebugExtension Condition="'$(Configuration)' == 'Debug'">d</DebugExtension>
    <IceBinPath Condition="'$(ICE_BIN_DIST)' == ''">..\..\..\..\cpp\bin\$(Platform)\$(Configuration)</IceBinPath>
    <IceBinPath Condition="'$(ICE_BIN_DIST)' != ''">..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\bin\$(Platform)\$(Configuration)</IceBinPath>
  </PropertyGroup>
  <Target Name="AfterClean">
    <Delete Files="$(OutDir)\bzip2$(DebugExtension).dll" />
    <Delete Files="$(OutDir)\ice37++11$(DebugExtension).dll" />
    <Delete Files="$(OutDir)\icediscovery37++11$(DebugExtension).dll" />
    <Delete Files="$(OutDir)\icelocatordiscovery37++11$(DebugExtension).dll" />
    <Delete Files="$(OutDir)\icessl37++11$(DebugExtension).dll" />
  </Target>
  <Target Name="AfterBuild">
    <Copy SourceFiles="$(IceBinPath)\bzip2$(DebugExtension).dll" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
    <Copy SourceFiles="$(IceBinPath)\ice37++11$(DebugExtension).dll" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
    <Copy SourceFiles="$(IceBinPath)\icediscovery37++11$(DebugExtension).dll" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
    <Copy SourceFiles="$(IceBinPath)\icelocatordiscovery37++11$(DebugExtension).dll" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
    <Copy SourceFiles="$(IceBinPath)\icessl37++11$(DebugExtension).dll" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
  </Target>
  <Target Name="MatlabHome" BeforeTargets="PrepareForBuild">
    <Error Text="Cannot detect a valid MATLAB installation" Condition="!Exists('$(MatlabHome)')" />
  </Target>
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.props') And '$(ICE_BIN_DIST)' == 'cpp'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.props'))" />
    <Error Condition="!Exists('..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.targets') And '$(ICE_BIN_DIST)' == 'cpp'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\zeroc.ice.v140.3.7.10\build\native\zeroc.ice.v140.targets'))" />
  </Target>
</Project>
