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

  <PropertyGroup Label="UserMacros">
    <ExternalDir>$(LolDir)\external</ExternalDir>

    <PlatformCode Condition="'$(Platform)'=='Win32'">i686</PlatformCode>
    <PlatformCode Condition="'$(Platform)'=='x64'">x86_64</PlatformCode>

    <!-- PEGTL -->
    <PegtlDir>$(LolDir)\src/3rdparty\pegtl\include</PegtlDir>
    <PegtlIncludes>$(PegtlDir)</PegtlIncludes>

    <!-- imgui -->
    <ImguiDir>$(LolDir)\src\3rdparty\imgui</ImguiDir>
    <ImguiIncludes>$(ImguiDir)</ImguiIncludes>

    <!-- OpenSSL -->
    <OpenSslDir>$(ExternalDir)\openssl-1.1.1d</OpenSslDir>

    <!-- cpp-httplib (depends on OpenSSL) -->
    <CppHttpDir>$(LolDir)\src/3rdparty\cpp-httplib</CppHttpDir>
    <CppHttpIncludes>$(CppHttpDir);$(OpenSslDir)\include</CppHttpIncludes>
    <CppHttpLibs>$(OpenSslDir)\lib\$(PlatformCode)-msvc</CppHttpLibs>
    <CppHttpDeps>libssl.lib;libcrypto.lib;crypt32.lib</CppHttpDeps>
    <Win32Defines>CPPHTTPLIB_OPENSSL_SUPPORT;$(Win32Defines)</Win32Defines>

    <!-- GTK+ & GtkGl -->
    <GtkDir>$(ExternalDir)\gtk-2.22.1</GtkDir>
    <GtkGlDir>$(ExternalDir)\gtkglarea-2.0.1</GtkGlDir>
    <GtkIncludes>$(GtkDir)\lib\glib-2.0\include;$(GtkDir)\lib\gtk-2.0\include;$(GtkDir)\include\glib-2.0;$(GtkDir)\include\gtk-2.0;$(GtkDir)\include\cairo;$(GtkDir)\include\pango-1.0;$(GtkDir)\include\gdk-pixbuf-2.0;$(GtkDir)\include\atk-1.0;$(GtkGlDir)\include</GtkIncludes>
    <GtkLibs>$(GtkDir)\lib;$(GtkDir)\bin;$(GtkGlDir)\lib</GtkLibs>
    <GtkDeps>gobject-2.0.lib;gthread-2.0.lib;glib-2.0.lib;gdk-win32-2.0.lib;gtk-win32-2.0.lib;gtkgl-2.0.lib</GtkDeps>

    <!-- Assimp -->
<!--
    <AssimpDir>$(ExternalDir)\assimp-3.1.1</AssimpDir>
    <AssimpIncludes>$(AssimpDir)\include</AssimpIncludes>
    <AssimpLibs Condition="'$(Platform)'=='Win32'">$(AssimpDir)\lib\win32</AssimpLibs>
    <AssimpLibs Condition="'$(Platform)'=='x64'">$(AssimpDir)\lib\x64</AssimpLibs>
    <AssimpDeps Condition="'$(Configuration)'=='Release'">zlibstatic.lib;assimp.lib</AssimpDeps>
    <AssimpDeps Condition="'$(Configuration)'=='Debug'">zlibstatic.lib;assimp.lib</AssimpDeps>
    <Win32Defines>LOL_USE_ASSIMP;$(Win32Defines)</Win32Defines>
-->

    <!-- libcaca -->
    <CacaDir>$(ExternalDir)\libcaca-0.99.beta18</CacaDir>
    <CacaIncludes>$(CacaDir)\include</CacaIncludes>
    <CacaLibs>$(CacaDir)\lib\$(PlatformCode)-w64-mingw32</CacaLibs>
    <CacaDeps>caca.lib</CacaDeps>
    <Win32Defines>CACA_STATIC;$(Win32Defines)</Win32Defines>

    <!-- GDI+ -->
    <GdiDeps>Gdiplus.lib</GdiDeps>
    <Win32Defines>LOL_USE_GDIPLUS;$(Win32Defines)</Win32Defines>

    <!-- Xinput -->
    <XinputIncludes>$(DXSDK_DIR)\Include</XinputIncludes>
    <XinputLibs Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</XinputLibs>
    <XinputLibs Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)\Lib\x64</XinputLibs>
    <XinputDeps>xinput.lib</XinputDeps>
    <Win32Defines>LOL_USE_XINPUT;$(Win32Defines)</Win32Defines>

    <!-- Windows-specific -->
    <Win32Defines>HAVE_STDIO_H;$(Win32Defines)</Win32Defines>

    <!-- PS4-specific -->
    <OrbisDefines>HAVE_STDIO_H;
                  $(OrbisDefines)</OrbisDefines>
  </PropertyGroup>

  <!-- OpenGL & GLEW -->
  <PropertyGroup Condition="'$(enable_gl)'!='no'" Label="UserMacros">
    <GlewDir>$(ExternalDir)\glew-2.1.0</GlewDir>
    <GlIncludes>$(GlewDir)\include</GlIncludes>
    <GlLibs>$(GlewDir)\lib\$(PlatformCode)-w64-mingw32</GlLibs>
    <GlDeps>opengl32.lib;glew32s.lib</GlDeps>
    <Win32Defines>HAVE_GL_2X;LOL_USE_GLEW;GLEW_STATIC;$(Win32Defines)</Win32Defines>
  </PropertyGroup>

  <!-- SDL -->
  <PropertyGroup Condition="'$(enable_sdl)'!='no'" Label="UserMacros">
    <SdlDir>$(ExternalDir)\sdl-2.0.9</SdlDir>
    <SdlImageDir>$(ExternalDir)\sdl-image-2.0.4</SdlImageDir>
    <SdlMixerDir>$(ExternalDir)\sdl-mixer-2.0.4</SdlMixerDir>
    <SdlLibDir>$(SdlDir)\lib\$(PlatformCode)-msvc</SdlLibDir>
    <SdlImageLibDir>$(SdlImageDir)\lib\$(PlatformCode)-msvc</SdlImageLibDir>
    <SdlMixerLibDir>$(SdlMixerDir)\lib\$(PlatformCode)-msvc</SdlMixerLibDir>
    <SdlIncludes>$(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include</SdlIncludes>
    <SdlLibs>$(SdlLibDir);$(SdlImageLibDir);$(SdlMixerLibDir)</SdlLibs>
    <SdlDeps>SDL2.lib;SDL2main.lib;SDL2_image.lib;SDL2_mixer.lib</SdlDeps>
    <Win32Defines>HAVE_SDL_H;LOL_USE_SDL;$(Win32Defines)</Win32Defines>
    <Win32Defines>LOL_USE_SDL_MIXER;LOL_USE_SDL_IMAGE;$(Win32Defines)</Win32Defines>
  </PropertyGroup>

  <!-- FFmpeg -->
  <PropertyGroup Condition="'$(enable_ffmpeg)'!='no'" Label="UserMacros">
    <FfmpegDir>$(ExternalDir)\ffmpeg-20190130</FfmpegDir>
    <FfmpegIncludes>$(FfmpegDir)\include</FfmpegIncludes>
    <FfmpegLibs>$(FfmpegDir)\lib\$(PlatformCode)-msvc</FfmpegLibs>
    <FfmpegDeps>swscale.lib;avformat.lib;avcodec.lib;swresample.lib;avutil.lib;ws2_32.lib;secur32.lib;bcrypt.lib</FfmpegDeps>
    <Win32Defines>LOL_USE_FFMPEG;$(Win32Defines)</Win32Defines>
  </PropertyGroup>

  <PropertyGroup />

  <ItemDefinitionGroup />

  <ItemGroup>
    <BuildMacro Include="ExternalDir"><Value>$(ExternalDir)</Value></BuildMacro>
    <BuildMacro Include="PlatformCode"><Value>$(PlatformCode)</Value></BuildMacro>
  </ItemGroup>
  <ItemGroup>
    <BuildMacro Include="PegtlDir"><Value>$(PegtlDir)</Value></BuildMacro>
    <BuildMacro Include="PegtlIncludes"><Value>$(PegtlIncludes)</Value></BuildMacro>
    <BuildMacro Include="CppHttpDir"><Value>$(CppHttpDir)</Value></BuildMacro>
    <BuildMacro Include="CppHttpIncludes"><Value>$(CppHttpIncludes)</Value></BuildMacro>
    <BuildMacro Include="ImguiDir"><Value>$(ImguiDir)</Value></BuildMacro>
    <BuildMacro Include="ImguiIncludes"><Value>$(ImguiIncludes)</Value></BuildMacro>
    <BuildMacro Include="LibGccDir"><Value>$(LibGccDir)</Value></BuildMacro>
    <BuildMacro Include="LibGccLibs"><Value>$(LibGccLibs)</Value></BuildMacro>
    <BuildMacro Include="LibGccDeps"><Value>$(LibGccDeps)</Value></BuildMacro>
    <BuildMacro Include="SdlDir"><Value>$(SdlDir)</Value></BuildMacro>
    <BuildMacro Include="SdlImageDir"><Value>$(SdlImageDir)</Value></BuildMacro>
    <BuildMacro Include="SdlMixerDir"><Value>$(SdlMixerDir)</Value></BuildMacro>
    <BuildMacro Include="SdlIncludes"><Value>$(SdlIncludes)</Value></BuildMacro>
    <BuildMacro Include="SdlLibs"><Value>$(SdlLibs)</Value></BuildMacro>
    <BuildMacro Include="SdlDeps"><Value>$(SdlDeps)</Value></BuildMacro>
    <BuildMacro Include="BtPhysDir"><Value>$(BtPhysDir)</Value></BuildMacro>
    <BuildMacro Include="BtPhysIncludes"><Value>$(BtPhysIncludes)</Value></BuildMacro>
    <BuildMacro Include="GtkDir"><Value>$(GtkDir)</Value></BuildMacro>
    <BuildMacro Include="GtkGlDir"><Value>$(GtkGlDir)</Value></BuildMacro>
    <BuildMacro Include="GtkIncludes"><Value>$(GtkIncludes)</Value></BuildMacro>
    <BuildMacro Include="GtkLibs"><Value>$(GtkLibs)</Value></BuildMacro>
    <BuildMacro Include="GtkDeps"><Value>$(GtkDeps)</Value></BuildMacro>
    <BuildMacro Include="FfmpegDir"><Value>$(FfmpegDir)</Value></BuildMacro>
    <BuildMacro Include="FfmpegIncludes"><Value>$(FfmpegIncludes)</Value></BuildMacro>
    <BuildMacro Include="FfmpegLibs"><Value>$(FfmpegLibs)</Value></BuildMacro>
    <BuildMacro Include="FfmpegDeps"><Value>$(FfmpegDeps)</Value></BuildMacro>
    <BuildMacro Include="AssimpDir"><Value>$(AssimpDir)</Value></BuildMacro>
    <BuildMacro Include="AssimpIncludes"><Value>$(AssimpIncludes)</Value></BuildMacro>
    <BuildMacro Include="AssimpLibs"><Value>$(AssimpLibs)</Value></BuildMacro>
    <BuildMacro Include="AssimpDeps"><Value>$(AssimpDeps)</Value></BuildMacro>
    <BuildMacro Include="CacaDir"><Value>$(CacaDir)</Value></BuildMacro>
    <BuildMacro Include="CacaIncludes"><Value>$(CacaIncludes)</Value></BuildMacro>
    <BuildMacro Include="CacaLibs"><Value>$(CacaLibs)</Value></BuildMacro>
    <BuildMacro Include="CacaDeps"><Value>$(CacaDeps)</Value></BuildMacro>
    <BuildMacro Include="GdiDeps"><Value>$(GdiDeps)</Value></BuildMacro>
    <BuildMacro Include="GlewDir"><Value>$(GlewDir)</Value></BuildMacro>
    <BuildMacro Include="GlIncludes"><Value>$(GlIncludes)</Value></BuildMacro>
    <BuildMacro Include="GlLibs"><Value>$(GlLibs)</Value></BuildMacro>
    <BuildMacro Include="GlDeps"><Value>$(GlDeps)</Value></BuildMacro>
    <BuildMacro Include="XinputIncludes"><Value>$(XinputIncludes)</Value></BuildMacro>
    <BuildMacro Include="XinputLibs"><Value>$(XinputLibs)</Value></BuildMacro>
    <BuildMacro Include="XinputDeps"><Value>$(XinputDeps)</Value></BuildMacro>
    <BuildMacro Include="Win32Defines"><Value>$(Win32Defines)</Value></BuildMacro>
    <BuildMacro Include="OrbisDeps"><Value>$(OrbisDeps)</Value></BuildMacro>
    <BuildMacro Include="OrbisLibs"><Value>$(OrbisLibs)</Value></BuildMacro>
    <BuildMacro Include="OrbisDefines"><Value>$(OrbisDefines)</Value></BuildMacro>
  </ItemGroup>

  <!--
     - Secret stuff for platforms under NDA
   -->
  <Import Condition="Exists('$(LolDir)\src\private\nx\msbuild\nx.vars.props')"
          Project="$(LolDir)\src\private\nx\msbuild\nx.vars.props" />

  <PropertyGroup>
    <BinDir Condition="Exists('$(SolutionDir)\lol')">$(SolutionDir)\binaries</BinDir>
    <BinDir Condition="!Exists('$(SolutionDir)\lol')">$(LolDir)\binaries</BinDir>
    <OutDir>$(BinDir)\$(Platform) $(PlatformToolset) $(Configuration)\</OutDir>
    <IntDir>$(BinDir)\$(Platform) $(PlatformToolset) $(Configuration)\$(ProjectName)\</IntDir>
  </PropertyGroup>

</Project>
