Bladeren bron

Refactor the msbuild feature selection mechanism.

Rename config-build.xml to build.config, move it to the root directory,
and add MSBuild flags for SDL, FFmpeg (unused yet) and OpenGL.
legacy
Sam Hocevar 7 jaren geleden
bovenliggende
commit
c6daf5be39
5 gewijzigde bestanden met toevoegingen van 51 en 46 verwijderingen
  1. +11
    -0
      build.config
  2. +0
    -13
      build/msbuild/config-build.xml
  3. +2
    -1
      build/msbuild/lol.config.props
  4. +1
    -1
      build/msbuild/lol.rules.props
  5. +37
    -31
      build/msbuild/lol.vars.props

+ 11
- 0
build.config Bestand weergeven

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">

<!-- yes/no values -->
<enable_ffmpeg>yes</enable_ffmpeg>
<enable_gl>yes</enable_gl>
<enable_sdl>yes</enable_sdl>

</PropertyGroup>
</Project>

+ 0
- 13
build/msbuild/config-build.xml Bestand weergeven

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">

<!-- ======================================== -->
<!-- Global Lol Engine Configuration Settings -->
<!-- ======================================== -->

<!-- Use Bullet for our physics solver? -->
<UseBullet>true</UseBullet>

</PropertyGroup>
</Project>

+ 2
- 1
build/msbuild/lol.config.props Bestand weergeven

@@ -4,7 +4,8 @@
<!--
- Import settings that can be overridden by the user
-->
<Import Project="config-build.xml" />
<Import Condition="Exists('$(SolutionDir)\lol\build.config')" Project="$(SolutionDir)\lol\build.config" />
<Import Condition="Exists('$(SolutionDir)\build.config')" Project="$(SolutionDir)\build.config" />

<!--
- Import defaults settings from Visual Studio


+ 1
- 1
build/msbuild/lol.rules.props Bestand weergeven

@@ -79,7 +79,7 @@

<!-- FIXME: not for the static library! -->
<PostBuildEvent Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">
<Command>
<Command Condition="'$(enable_sdl)'!='no'">
set A=$(SdlLibs)
:again
for /f "tokens=1* delims=;" %%I in ("%A%") do (


+ 37
- 31
build/msbuild/lol.vars.props Bestand weergeven

@@ -18,18 +18,6 @@
<LibGccLibs Condition="'$(Platform)'=='x64'">$(LibGccDir)\lib\x86_64-w64-mingw32</LibGccLibs>
<LibGccDeps>libgcc.lib</LibGccDeps>

<!-- SDL -->
<SdlDir>$(ExternalDir)\sdl-2.0.3</SdlDir>
<SdlImageDir>$(ExternalDir)\sdl-image-2.0.0</SdlImageDir>
<SdlMixerDir>$(ExternalDir)\sdl-mixer-2.0.0</SdlMixerDir>
<SdlIncludes>$(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include</SdlIncludes>
<SdlLibs Condition="'$(Platform)'=='Win32'">$(SdlDir)\lib\i686-w64-mingw32;$(SdlImageDir)\lib\i686-w64-msvc;$(SdlMixerDir)\lib\i686-w64-msvc</SdlLibs>
<SdlLibs Condition="'$(Platform)'=='x64'">$(SdlDir)\lib\x86_64-msvc;$(SdlImageDir)\lib\x86_64-msvc;$(SdlMixerDir)\lib\x86_64-msvc</SdlLibs>
<SdlDeps Condition="'$(Platform)'=='Win32'">SDL2.lib;SDL2main.lib;SDL2_image.lib;SDL2_mixer.lib</SdlDeps>
<SdlDeps Condition="'$(Platform)'=='x64'">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>

<!-- GTK+ & GtkGl -->
<GtkDir>$(ExternalDir)\gtk-2.22.1</GtkDir>
<GtkGlDir>$(ExternalDir)\gtkglarea-2.0.1</GtkGlDir>
@@ -37,16 +25,6 @@
<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>

<!-- FFmpeg -->
<!--
<FfmpegDir>$(ExternalDir)\ffmpeg-20141018</FfmpegDir>
<FfmpegIncludes>$(FfmpegDir)\include</FfmpegIncludes>
<FfmpegLibs Condition="'$(Platform)'=='Win32'">$(FfmpegDir)\lib\i686-w64-mingw32</FfmpegLibs>
<FfmpegLibs Condition="'$(Platform)'=='x64'">$(FfmpegDir)\lib\x86_64-w64-mingw32</FfmpegLibs>
<FfmpegDeps>swscale.lib;avformat.lib;avcodec.lib;swresample.lib;avutil.lib;ws2_32.lib</FfmpegDeps>
<Win32Defines>LOL_USE_FFMPEG;$(Win32Defines)</Win32Defines>
-->

<!-- Assimp -->
<AssimpDir>$(ExternalDir)\assimp-3.1.1</AssimpDir>
<AssimpIncludes>$(AssimpDir)\include</AssimpIncludes>
@@ -69,15 +47,6 @@
<GdiDeps>Gdiplus.lib</GdiDeps>
<Win32Defines>LOL_USE_GDIPLUS;$(Win32Defines)</Win32Defines>

<!-- OpenGL & GLEW -->
<GlewDir>$(ExternalDir)\glew-1.9.0</GlewDir>
<GlIncludes>$(GlewDir)\include</GlIncludes>
<GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs>
<GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs>
<GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32s.lib</GlDeps>
<GlDeps Condition="'$(Platform)'=='x64'">opengl32.lib;glew32s.lib</GlDeps>
<Win32Defines>HAVE_GL_2X;LOL_USE_GLEW;GLEW_STATIC;$(Win32Defines)</Win32Defines>

<!-- Xinput -->
<XinputIncludes>$(DXSDK_DIR)\Include</XinputIncludes>
<XinputLibs Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</XinputLibs>
@@ -91,8 +60,45 @@
<!-- PS4-specific -->
<OrbisDefines>HAVE_STDIO_H;
$(OrbisDefines)</OrbisDefines>
</PropertyGroup>

<!-- OpenGL & GLEW -->
<PropertyGroup Condition="'$(enable_gl)'!='no'" Label="UserMacros">
<GlewDir>$(ExternalDir)\glew-1.9.0</GlewDir>
<GlIncludes>$(GlewDir)\include</GlIncludes>
<GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs>
<GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs>
<GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32s.lib</GlDeps>
<GlDeps Condition="'$(Platform)'=='x64'">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.3</SdlDir>
<SdlImageDir>$(ExternalDir)\sdl-image-2.0.0</SdlImageDir>
<SdlMixerDir>$(ExternalDir)\sdl-mixer-2.0.0</SdlMixerDir>
<SdlIncludes>$(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include</SdlIncludes>
<SdlLibs Condition="'$(Platform)'=='Win32'">$(SdlDir)\lib\i686-w64-mingw32;$(SdlImageDir)\lib\i686-w64-msvc;$(SdlMixerDir)\lib\i686-w64-msvc</SdlLibs>
<SdlLibs Condition="'$(Platform)'=='x64'">$(SdlDir)\lib\x86_64-msvc;$(SdlImageDir)\lib\x86_64-msvc;$(SdlMixerDir)\lib\x86_64-msvc</SdlLibs>
<SdlDeps Condition="'$(Platform)'=='Win32'">SDL2.lib;SDL2main.lib;SDL2_image.lib;SDL2_mixer.lib</SdlDeps>
<SdlDeps Condition="'$(Platform)'=='x64'">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-20141018</FfmpegDir>
<FfmpegIncludes>$(FfmpegDir)\include</FfmpegIncludes>
<FfmpegLibs Condition="'$(Platform)'=='Win32'">$(FfmpegDir)\lib\i686-w64-mingw32</FfmpegLibs>
<FfmpegLibs Condition="'$(Platform)'=='x64'">$(FfmpegDir)\lib\x86_64-w64-mingw32</FfmpegLibs>
<FfmpegDeps>swscale.lib;avformat.lib;avcodec.lib;swresample.lib;avutil.lib;ws2_32.lib</FfmpegDeps>
<Win32Defines>LOL_USE_FFMPEG;$(Win32Defines)</Win32Defines>
</PropertyGroup>
-->

<PropertyGroup />

<ItemDefinitionGroup />


Laden…
Annuleren
Opslaan