Changeset 1448


Ignore:
Timestamp:
Jun 8, 2012, 7:50:57 PM (8 years ago)
Author:
sam
Message:

build: allow to use OpenGL instead of Direct3D in Visual Studio by simply
changing a configuration variable in a file.

Location:
trunk/win32
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/win32/Lol.Core.Config.props

    r1380 r1448  
    11<?xml version="1.0" encoding="utf-8"?>
    22<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     3  <Import Project="Lol.Core.Build.props" />
    34  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    45  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
  • trunk/win32/Lol.Core.Rules.props

    r1421 r1448  
    3636      <GenerateDebugInformation>true</GenerateDebugInformation>
    3737      <!-- FIXME: not for the static library! -->
    38       <AdditionalDependencies Condition="'$(Platform)'=='Win32'">kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SdlDeps);$(GdiDeps);$(GlDeps);$(D3d9Deps);%(AdditionalDependencies)</AdditionalDependencies>
    39       <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32'">$(SdlLibs);$(GlLibs);$(D3d9Libs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    40       <AdditionalDependencies Condition="'$(Platform)'=='x64'">kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SdlDeps);$(GdiDeps);$(GlDeps);$(D3d9Deps);%(AdditionalDependencies)</AdditionalDependencies>
    41       <AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(SdlLibs);$(GlLibs);$(D3d9Libs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     38      <AdditionalDependencies Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SdlDeps);$(GdiDeps);%(AdditionalDependencies)</AdditionalDependencies>
     39      <AdditionalDependencies Condition="'$(UseOpenGL)'=='true' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(GlDeps);%(AdditionalDependencies)</AdditionalDependencies>
     40      <AdditionalDependencies Condition="'$(UseOpenGL)'=='false' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(D3d9Deps);%(AdditionalDependencies)</AdditionalDependencies>
     41      <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">$(SdlLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     42      <AdditionalLibraryDirectories Condition="'$(UseOpenGL)'=='true' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(GlLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     43      <AdditionalLibraryDirectories Condition="'$(UseOpenGL)'=='false' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(D3d9Libs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    4244      <AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies)</AdditionalDependencies>
    4345      <AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;%(AdditionalDependencies)</AdditionalDependencies>
     
    4951
    5052    <!-- FIXME: not for the static library! -->
    51     <PostBuildEvent Condition="'$(Platform)'=='Win32'">
    52       <Command>
    53         set A=$(SdlLibs)
    54         :again
    55         for /f "tokens=1* delims=;" %%I in ("%A%") do (
    56           if not "%%I" == "" xcopy /y /c /d "%%I"\*.dll "$(TargetDir)" &amp;&amp; set A=%%J
    57           if not "%%I" == "" goto again
    58         )
    59       </Command>
    60     </PostBuildEvent>
    61     <PostBuildEvent Condition="'$(Platform)'=='x64'">
     53    <PostBuildEvent Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">
    6254      <Command>
    6355        set A=$(SdlLibs)
  • trunk/win32/Lol.Core.Vars.props

    r1421 r1448  
    4343    <D3d9Deps Condition="'$(Configuration)'=='Debug'">d3d9.lib;d3dx9d.lib;xinput.lib</D3d9Deps>
    4444
    45     <Win32Defines>HAVE_SDL_H;USE_SDL;USE_GDIPLUS;USE_D3D9</Win32Defines>
     45    <Win32Defines Condition="'$(UseOpenGL)'=='true'">HAVE_SDL_H;USE_SDL;USE_GDIPLUS;HAVE_GL_2X;USE_GLEW;GLEW_STATIC</Win32Defines>
     46    <Win32Defines Condition="'$(UseOpenGL)'=='false'">HAVE_SDL_H;USE_SDL;USE_GDIPLUS;USE_D3D9</Win32Defines>
    4647    <XboxDefines></XboxDefines>
    4748  </PropertyGroup>
  • trunk/win32/lolcore.vcxproj

    r1406 r1448  
    3232    <Keyword>Win32Proj</Keyword>
    3333  </PropertyGroup>
    34   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
     34  <Import Project="Lol.Core.Config.props" />
    3535  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    3636    <UseDebugLibraries>true</UseDebugLibraries>
     
    5858    <CharacterSet>MultiByte</CharacterSet>
    5959  </PropertyGroup>
    60   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    6160  <ImportGroup Label="ExtensionSettings">
    6261    <Import Project="Lol.Fx.props" />
  • trunk/win32/lolengine.sln

    r1447 r1448  
    7171EndProject
    7272Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{1AFD580B-98B8-4689-B661-38C41132C60E}"
     73        ProjectSection(SolutionItems) = preProject
     74                Lol.Core.Build.props = Lol.Core.Build.props
     75        EndProjectSection
    7376EndProject
    7477Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{3D341D8A-E400-4B1D-BC05-B5C35487D9B5}"
Note: See TracChangeset for help on using the changeset viewer.