MSVC 2008 Projects: Use Custom Build Rules

...for all of the copying of the pre-configured headers for Cogl.  This
makes it much easier for people using the projects for building Cogl to
clean up files that are "generated", and this commit is the last bit for
it.  Also clean up the property sheets as a result.

Also fix the Cogl project that it does indeed look for headers in
cogl/deprecated, so that the build is fixed.

Similar updates to the Visual Studio 2010 Projects will follow.
This commit is contained in:
Chun-wei Fan 2014-02-27 17:43:59 +08:00
parent a0441778ad
commit 8b9f545e4c
2 changed files with 202 additions and 59 deletions

View File

@ -27,15 +27,12 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefines)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(DebugLibBuildDefines);$(CoglBuildDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -65,15 +62,12 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefinesSDL)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(DebugLibBuildDefines);$(CoglBuildDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -102,15 +96,12 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefines)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(DebugLibBuildDefines);$(CoglBuildDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -140,15 +131,12 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefinesSDL)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(DebugLibBuildDefines);$(CoglBuildDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -178,15 +166,12 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefines)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="$(ReleaseLibBuildDefines);$(CoglBuildDefines)"
RuntimeLibrary="2"
@ -219,15 +204,12 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefinesSDL)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="$(ReleaseLibBuildDefines);$(CoglBuildDefines)"
RuntimeLibrary="2"
@ -258,14 +240,11 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefines)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(ReleaseLibBuildDefines);$(CoglBuildDefines)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@ -295,14 +274,11 @@ $(PreBuildCmd)
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="
$(DoDefinesSDL)
$(PreBuildCmd)
"
CommandLine=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\cogl\tesselator;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
AdditionalIncludeDirectories="..\..\..\cogl\deprecated;..\..\..\cogl\winsys;..\..\..\cogl\driver\gl;..\..\..\cogl\driver\gl\gl"
PreprocessorDefinitions="$(ReleaseLibBuildDefines);$(CoglBuildDefines)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@ -364,6 +340,182 @@ $(PreBuildCmd)
>
</Filter>
<Filter Name="Resource Files">
<File RelativePath="..\..\..\config.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32"
CommandLine="$(CopyConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\cogl\cogl-gl-header.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-gl-header.h from cogl-gl-header.h.win32"
CommandLine="$(CopyGLHeaderH)"
Outputs="..\..\..\cogl\cogl-gl-header.h"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\cogl\cogl-defines.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32..."
CommandLine="$(CopyDefinesH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\WGL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32..."
CommandLine="$(CopyDefinesH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\WGL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32..."
CommandLine="$(CopyDefinesH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\WGL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32..."
CommandLine="$(CopyDefinesH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\WGL_DEFINES"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\cogl\cogl-defines.h.win32_sdl">
<FileConfiguration Name="Debug_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32_sdl..."
CommandLine="$(CopyDefinesSDLH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\SDL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32_sdl..."
CommandLine="$(CopyDefinesSDLH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\SDL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32_sdl..."
CommandLine="$(CopyDefinesSDLH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\SDL_DEFINES"
/>
</FileConfiguration>
<FileConfiguration Name="Release_SDL|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying cogl-defines.h from cogl-defines.h.win32_sdl..."
CommandLine="$(CopyDefinesSDLH)"
Outputs="..\..\..\cogl\cogl-defines.h;..\..\..\cogl\SDL_DEFINES"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\cogl\cogl.symbols">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"

View File

@ -74,7 +74,7 @@
Value="COGL_COMPILATION"
/>
<UserMacro
Name="DoDefinesSDL"
Name="CopyDefinesSDLH"
Value="
if exist ..\..\..\cogl\SDL_DEFINES goto DONE_COGL_DEFINES_H&#x0D;&#x0A;
if not exist ..\..\..\cogl\WGL_DEFINES goto DO_COGL_DEFINES_H&#x0D;&#x0A;
@ -87,7 +87,7 @@ copy ..\..\..\cogl\SDL_DEFINES ..\..\..\cogl\cogl-defines.h&#x0D;&#x0A;
"
/>
<UserMacro
Name="DoDefines"
Name="CopyDefinesH"
Value="
if exist ..\..\..\cogl\WGL_DEFINES goto DONE_COGL_DEFINES_H&#x0D;&#x0A;
if not exist ..\..\..\cogl\SDL_DEFINES goto DO_COGL_DEFINES_H&#x0D;&#x0A;
@ -100,52 +100,43 @@ copy ..\..\..\cogl\WGL_DEFINES ..\..\..\cogl\cogl-defines.h&#x0D;&#x0A;
"
/>
<UserMacro
Name="PreBuildCmd"
Value="
if exist ..\..\..\config.h goto DONE_CONFIG_H&#x0D;&#x0A;
copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
if not exist ..\..\..\cogl\cogl-gl-header.h copy ..\..\..\cogl\cogl-gl-header.h.win32 ..\..\..\cogl\cogl-gl-header.h&#x0D;&#x0A;
:DONE_CONFIG_H&#x0D;&#x0A;
"
Name="CopyConfigH"
Value="copy ..\..\..\config.h.win32 ..\..\..\config.h"
/>
<UserMacro
Name="CopyGLHeaderH"
Value="copy ..\..\..\cogl\cogl-gl-header.h.win32 ..\..\..\cogl\cogl-gl-header.h"
/>
<UserMacro
Name="GenCoglPathEnumsH"
Value="
if exist ..\..\..\cogl-path\cogl-path-enum-types.h goto DONE_COGLPATH_ENUMS_H&#x0D;&#x0A;
cd ..\..\..\cogl-path&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-path-enum-types.h.in cogl-path-types.h cogl1-path-functions.h &gt; cogl-path-enum-types.h&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
:DONE_COGLPATH_ENUMS_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenCoglPathEnumsC"
Value="
if exist ..\..\..\cogl-path\cogl-path-enum-types.c goto DONE_COGLPATH_ENUMS_C&#x0D;&#x0A;
cd ..\..\..\cogl-path&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-path-enum-types.c.in cogl-path-types.h cogl1-path-functions.h &gt; cogl-path-enum-types.c&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
:DONE_COGLPATH_ENUMS_C&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenCoglEnumsH"
Value="
if exist ..\..\..\cogl\cogl-enum-types.h goto DONE_COGL_ENUMS_H&#x0D;&#x0A;
cd ..\..\..\cogl&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-enum-types.h.in cogl1-context.h cogl-bitmap.h cogl-color.h cogl-fixed.h cogl-material-compat.h cogl-matrix.h cogl-offscreen.h cogl-primitives.h cogl-shader.h cogl-texture.h cogl-types.h cogl-vertex-buffer.h cogl-clutter.h cogl.h cogl-win32-renderer.h &gt; cogl-enum-types.h&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-enum-types.h.in deprecated\cogl-clip-state.h deprecated\cogl-fixed.h deprecated\cogl-material-compat.h deprecated\cogl-vertex-buffer.h deprecated\cogl-shader.h deprecated\cogl-clutter.h deprecated\cogl-type-casts.h deprecated\cogl-framebuffer-deprecated.h deprecated\cogl-texture-deprecated.h deprecated\cogl-auto-texture.h cogl1-context.h cogl-bitmap.h cogl-color.h cogl-matrix.h cogl-offscreen.h cogl-primitives.h cogl-texture.h cogl-types.h cogl.h cogl-win32-renderer.h &gt; cogl-enum-types.h&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
:DONE_COGL_ENUMS_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenCoglEnumsC"
Value="
if exist ..\..\..\cogl\cogl-enum-types.c goto DONE_COGL_ENUMS_C&#x0D;&#x0A;
cd ..\..\..\cogl&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-enum-types.c.in cogl1-context.h cogl-bitmap.h cogl-color.h cogl-fixed.h cogl-material-compat.h cogl-matrix.h cogl-offscreen.h cogl-primitives.h cogl-shader.h cogl-texture.h cogl-types.h cogl-vertex-buffer.h cogl-clutter.h cogl.h cogl-win32-renderer.h &gt; cogl-enum-types.c&#x0D;&#x0A;
perl $(GlibEtcInstallRoot)\bin\glib-mkenums --template cogl-enum-types.c.in deprecated\cogl-clip-state.h deprecated\cogl-fixed.h deprecated\cogl-material-compat.h deprecated\cogl-vertex-buffer.h deprecated\cogl-shader.h deprecated\cogl-clutter.h deprecated\cogl-type-casts.h deprecated\cogl-framebuffer-deprecated.h deprecated\cogl-texture-deprecated.h deprecated\cogl-auto-texture.h cogl1-context.h cogl-bitmap.h cogl-color.h cogl-matrix.h cogl-offscreen.h cogl-primitives.h cogl-texture.h cogl-types.h cogl.h cogl-win32-renderer.h &gt; cogl-enum-types.c&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
:DONE_COGL_ENUMS_C&#x0D;&#x0A;
"
/>
<UserMacro