<?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>$(SolutionDir)\..\..\external</ExternalDir>

    <!-- Flex & Bison -->
    <FlexDir>$(ExternalDir)\flex-2.5.35</FlexDir>
    <FlexIncludes>$(FlexDir)\include</FlexIncludes>

    <!-- SDL -->
    <SdlDir>$(ExternalDir)\sdl-1.2.15</SdlDir>
    <SdlImageDir>$(ExternalDir)\sdl-image-1.2.10</SdlImageDir>
    <SdlMixerDir>$(ExternalDir)\sdl-mixer-1.2.11</SdlMixerDir>
    <SdlIncludes>$(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include</SdlIncludes>
    <SdlLibs Condition="'$(Platform)'=='Win32'">$(SdlDir)\lib\i686-w64-mingw32;$(SdlImageDir)\lib\i686-w64-mingw32;$(SdlMixerDir)\lib\i686-w64-mingw32</SdlLibs>
    <SdlLibs Condition="'$(Platform)'=='x64'">$(SdlDir)\lib\x86_64-msvc</SdlLibs>
    <SdlDeps Condition="'$(Platform)'=='Win32'">SDL.lib;SDLmain.lib;SDL_image.lib;SDL_mixer.lib</SdlDeps>
    <SdlDeps Condition="'$(Platform)'=='x64'">SDL.lib;SDLmain.lib</SdlDeps>
    <Win32Defines>HAVE_SDL_H;USE_SDL;$(Win32Defines)</Win32Defines>

    <!-- BulletPhysics -->
    <BtPhysDir>$(ExternalDir)\bullet-2.80-rev2531</BtPhysDir>
    <BtPhysIncludes>$(BtPhysDir)\include;$(BtPhysDir)\include\bullet</BtPhysIncludes>
    <Win32Defines Condition="'$(UseBullet)'=='true'">HAVE_PHYS_USE_BULLET;$(Win32Defines)</Win32Defines>
    <Ps3Defines Condition="'$(UseBullet)'=='true'">HAVE_PHYS_USE_BULLET;$(Ps3Defines)</Ps3Defines>
    <XboxDefines Condition="'$(UseBullet)'=='true'">HAVE_PHYS_USE_BULLET;$(XboxDefines)</XboxDefines>

    <!-- 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>

    <!-- libcaca -->
    <CacaDir>$(ExternalDir)\libcaca-0.99.beta18</CacaDir>
    <CacaIncludes>$(CacaDir)\include</CacaIncludes>
    <CacaLibs Condition="'$(Platform)'=='Win32'">$(CacaDir)\lib\i686-w64-mingw32</CacaLibs>
    <CacaLibs Condition="'$(Platform)'=='x64'">$(CacaDir)\lib\x86_64-w64-mingw32</CacaLibs>
    <CacaDeps>caca.lib</CacaDeps>
    <Win32Defines>CACA_STATIC;$(Win32Defines)</Win32Defines>

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

    <!-- OpenGL & GLEW -->
    <GlewDir>$(ExternalDir)\glew-1.9.0</GlewDir>
    <GlIncludes>$(GlewDir)\include\GL</GlIncludes>
    <GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs>
    <GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs>
    <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Debug'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\debug</GlLibs>
    <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Release'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\opt</GlLibs>
    <GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32s.lib</GlDeps>
    <GlDeps Condition="'$(Platform)'=='x64'">opengl32.lib;glew32s.lib</GlDeps>
    <GlDeps Condition="'$(Platform)'=='PS3'">libPSGL.a;libgcm_cmd.a;libgcm_sys_stub.a;libcgc.a;libPSGLcgc.a</GlDeps>
    <Win32Defines Condition="'$(UseOpenGL)'=='true'">HAVE_GL_2X;USE_GLEW;GLEW_STATIC;$(Win32Defines)</Win32Defines>
    <Ps3Defines>HAVE_GLES_2X;$(Ps3Defines)</Ps3Defines>

    <!-- Direct3D 9 -->
    <D3d9Includes>$(DXSDK_DIR)\Include</D3d9Includes>
    <D3d9Libs Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</D3d9Libs>
    <D3d9Libs Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)\Lib\x64</D3d9Libs>
    <D3d9Deps Condition="'$(Configuration)'=='Release'">d3d9.lib;d3dx9.lib</D3d9Deps>
    <D3d9Deps Condition="'$(Configuration)'=='Debug'">d3d9.lib;d3dx9d.lib</D3d9Deps>
    <Win32Defines Condition="'$(UseOpenGL)'=='false'">USE_D3D9;$(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>USE_XINPUT;$(Win32Defines)</Win32Defines>

    <!-- PS3-specific -->
    <Ps3Deps>libsysmodule_stub.a;libsysutil_stub.a;libresc_stub.a;
             libpngdec_stub.a;
             libio_stub.a;libusbd_stub.a;libpadfilter.a</Ps3Deps>

    <!-- X360-specific -->
    <XboxDefines>$(XboxDefines)</XboxDefines>
  </PropertyGroup>
  <PropertyGroup />
  <ItemDefinitionGroup />
  <ItemGroup>
    <BuildMacro Include="ExternalDir"><Value>$(ExternalDir)</Value></BuildMacro>
    <BuildMacro Include="FlexDir"><Value>$(FlexDir)</Value></BuildMacro>
    <BuildMacro Include="FlexIncludes"><Value>$(FlexIncludes)</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="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="D3d9Includes"><Value>$(D3d9Includes)</Value></BuildMacro>
    <BuildMacro Include="D3d9Libs"><Value>$(D3d9Libs)</Value></BuildMacro>
    <BuildMacro Include="D3d9Deps"><Value>$(D3d9Deps)</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="XboxDefines"><Value>$(XboxDefines)</Value></BuildMacro>
    <BuildMacro Include="Ps3Deps"><Value>$(Ps3Deps)</Value></BuildMacro>
    <BuildMacro Include="Ps3Defines"><Value>$(Ps3Defines)</Value></BuildMacro>
  </ItemGroup>
  <PropertyGroup>
    <OutDir>$(SolutionDir)..\..\binaries\$(Platform) $(Configuration)\</OutDir>
    <IntDir>$(SolutionDir)..\..\binaries\$(Platform) $(Configuration)\$(ProjectName)\</IntDir>
  </PropertyGroup>
</Project>
