Moved windows-only targets into OS==win conditional.
Review URL: http://codereview.appspot.com/1473043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@325 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/samples/build_samples.gyp b/samples/build_samples.gyp
index 695a2ba..313b745 100644
--- a/samples/build_samples.gyp
+++ b/samples/build_samples.gyp
@@ -30,123 +30,129 @@
'translator/translator.cpp',
],
},
- {
- 'target_name': 'es_util',
- 'type': 'static_library',
- 'dependencies': [
- '../src/build_angle.gyp:libEGL',
- '../src/build_angle.gyp:libGLESv2',
- ],
- 'include_dirs': [
- 'gles2_book/Common',
- '../include',
- ],
- 'sources': [
- 'gles2_book/Common/esShader.c',
- 'gles2_book/Common/esShapes.c',
- 'gles2_book/Common/esTransform.c',
- 'gles2_book/Common/esUtil.c',
- 'gles2_book/Common/esUtil.h',
- 'gles2_book/Common/esUtil_win.h',
- 'gles2_book/Common/Win32/esUtil_TGA.c',
- 'gles2_book/Common/Win32/esUtil_win32.c',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- 'gles2_book/Common',
- '../include',
- ],
- },
- },
- {
- 'target_name': 'hello_triangle',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/Hello_Triangle/Hello_Triangle.c',
- ],
- },
- {
- 'target_name': 'mip_map_2d',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/MipMap2D/MipMap2D.c',
- ],
- },
- {
- 'target_name': 'multi_texture',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/MultiTexture/MultiTexture.c',
- ],
- 'copies': [
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'targets': [
{
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- 'gles2_book/MultiTexture/basemap.tga',
- 'gles2_book/MultiTexture/lightmap.tga',
+ 'target_name': 'es_util',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../src/build_angle.gyp:libEGL',
+ '../src/build_angle.gyp:libGLESv2',
+ ],
+ 'include_dirs': [
+ 'gles2_book/Common',
+ '../include',
+ ],
+ 'sources': [
+ 'gles2_book/Common/esShader.c',
+ 'gles2_book/Common/esShapes.c',
+ 'gles2_book/Common/esTransform.c',
+ 'gles2_book/Common/esUtil.c',
+ 'gles2_book/Common/esUtil.h',
+ 'gles2_book/Common/esUtil_win.h',
+ 'gles2_book/Common/Win32/esUtil_TGA.c',
+ 'gles2_book/Common/Win32/esUtil_win32.c',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ 'gles2_book/Common',
+ '../include',
+ ],
+ },
+ },
+ {
+ 'target_name': 'hello_triangle',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/Hello_Triangle/Hello_Triangle.c',
+ ],
+ },
+ {
+ 'target_name': 'mip_map_2d',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/MipMap2D/MipMap2D.c',
+ ],
+ },
+ {
+ 'target_name': 'multi_texture',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/MultiTexture/MultiTexture.c',
+ ],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ 'gles2_book/MultiTexture/basemap.tga',
+ 'gles2_book/MultiTexture/lightmap.tga',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'particle_system',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/ParticleSystem/ParticleSystem.c',
+ ],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ 'gles2_book/ParticleSystem/smoke.tga',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'simple_texture_2d',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/Simple_Texture2D/Simple_Texture2D.c',
+ ],
+ },
+ {
+ 'target_name': 'simple_texture_cubemap',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.c',
+ ],
+ },
+ {
+ 'target_name': 'simple_vertex_shader',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/Simple_VertexShader/Simple_VertexShader.c',
+ ],
+ },
+ {
+ 'target_name': 'stencil_test',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/Stencil_Test/Stencil_Test.c',
+ ],
+ },
+ {
+ 'target_name': 'texture_wrap',
+ 'type': 'executable',
+ 'dependencies': ['es_util'],
+ 'sources': [
+ 'gles2_book/TextureWrap/TextureWrap.c',
],
},
],
- },
- {
- 'target_name': 'particle_system',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/ParticleSystem/ParticleSystem.c',
- ],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- 'gles2_book/ParticleSystem/smoke.tga',
- ],
- },
- ],
- },
- {
- 'target_name': 'simple_texture_2d',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/Simple_Texture2D/Simple_Texture2D.c',
- ],
- },
- {
- 'target_name': 'simple_texture_cubemap',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.c',
- ],
- },
- {
- 'target_name': 'simple_vertex_shader',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/Simple_VertexShader/Simple_VertexShader.c',
- ],
- },
- {
- 'target_name': 'stencil_test',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/Stencil_Test/Stencil_Test.c',
- ],
- },
- {
- 'target_name': 'texture_wrap',
- 'type': 'executable',
- 'dependencies': ['es_util'],
- 'sources': [
- 'gles2_book/TextureWrap/TextureWrap.c',
- ],
- },
+ }],
],
}
diff --git a/src/build_angle.gyp b/src/build_angle.gyp
index 27bf6ac..ca6132d 100644
--- a/src/build_angle.gyp
+++ b/src/build_angle.gyp
@@ -94,6 +94,7 @@
'--outfile=<(glslang_cpp_file)',
'<(_inputs)',
],
+ 'message': 'Executing flex on <(_inputs)',
},
{
'action_name': 'bison_glslang',
@@ -107,6 +108,7 @@
'--output=<(glslang_tab_cpp_file)',
'<(_inputs)',
],
+ 'message': 'Executing bison on <(_inputs)',
},
],
},
@@ -144,88 +146,94 @@
'compiler/UnfoldSelect.h',
],
},
- {
- 'target_name': 'libGLESv2',
- 'type': 'shared_library',
- 'dependencies': ['translator_hlsl'],
- 'include_dirs': [
- '.',
- '../include',
- '$(DXSDK_DIR)/include',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'targets': [
+ {
+ 'target_name': 'libGLESv2',
+ 'type': 'shared_library',
+ 'dependencies': ['translator_hlsl'],
+ 'include_dirs': [
+ '.',
+ '../include',
+ '$(DXSDK_DIR)/include',
+ ],
+ 'sources': [
+ 'common/angleutils.h',
+ 'common/debug.cpp',
+ 'common/debug.h',
+ 'libGLESv2/geometry/backend.cpp',
+ 'libGLESv2/geometry/backend.h',
+ 'libGLESv2/geometry/dx9.cpp',
+ 'libGLESv2/geometry/dx9.h',
+ 'libGLESv2/geometry/IndexDataManager.cpp',
+ 'libGLESv2/geometry/IndexDataManager.h',
+ 'libGLESv2/geometry/vertexconversion.h',
+ 'libGLESv2/geometry/VertexDataManager.cpp',
+ 'libGLESv2/geometry/VertexDataManager.h',
+ 'libGLESv2/Blit.cpp',
+ 'libGLESv2/Blit.h',
+ 'libGLESv2/Buffer.cpp',
+ 'libGLESv2/Buffer.h',
+ 'libGLESv2/Context.cpp',
+ 'libGLESv2/Context.h',
+ 'libGLESv2/Framebuffer.cpp',
+ 'libGLESv2/Framebuffer.h',
+ 'libGLESv2/libGLESv2.cpp',
+ 'libGLESv2/libGLESv2.def',
+ 'libGLESv2/main.cpp',
+ 'libGLESv2/main.h',
+ 'libGLESv2/mathutil.h',
+ 'libGLESv2/Program.cpp',
+ 'libGLESv2/Program.h',
+ 'libGLESv2/Renderbuffer.cpp',
+ 'libGLESv2/Renderbuffer.h',
+ 'libGLESv2/Shader.cpp',
+ 'libGLESv2/Shader.h',
+ 'libGLESv2/Texture.cpp',
+ 'libGLESv2/Texture.h',
+ 'libGLESv2/utilities.cpp',
+ 'libGLESv2/utilities.h',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
+ 'AdditionalDependencies': ['d3dx9.lib'],
+ }
+ },
+ },
+ {
+ 'target_name': 'libEGL',
+ 'type': 'shared_library',
+ 'dependencies': ['libGLESv2'],
+ 'include_dirs': [
+ '.',
+ '../include',
+ ],
+ 'sources': [
+ 'common/angleutils.h',
+ 'common/debug.cpp',
+ 'common/debug.h',
+ 'libEGL/Config.cpp',
+ 'libEGL/Config.h',
+ 'libEGL/Display.cpp',
+ 'libEGL/Display.h',
+ 'libEGL/libEGL.cpp',
+ 'libEGL/libEGL.def',
+ 'libEGL/main.cpp',
+ 'libEGL/main.h',
+ 'libEGL/Surface.cpp',
+ 'libEGL/Surface.h',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': ['d3d9.lib'],
+ }
+ },
+ },
],
- 'sources': [
- 'common/angleutils.h',
- 'common/debug.cpp',
- 'common/debug.h',
- 'libGLESv2/geometry/backend.cpp',
- 'libGLESv2/geometry/backend.h',
- 'libGLESv2/geometry/dx9.cpp',
- 'libGLESv2/geometry/dx9.h',
- 'libGLESv2/geometry/IndexDataManager.cpp',
- 'libGLESv2/geometry/IndexDataManager.h',
- 'libGLESv2/geometry/vertexconversion.h',
- 'libGLESv2/geometry/VertexDataManager.cpp',
- 'libGLESv2/geometry/VertexDataManager.h',
- 'libGLESv2/Blit.cpp',
- 'libGLESv2/Blit.h',
- 'libGLESv2/Buffer.cpp',
- 'libGLESv2/Buffer.h',
- 'libGLESv2/Context.cpp',
- 'libGLESv2/Context.h',
- 'libGLESv2/Framebuffer.cpp',
- 'libGLESv2/Framebuffer.h',
- 'libGLESv2/libGLESv2.cpp',
- 'libGLESv2/libGLESv2.def',
- 'libGLESv2/main.cpp',
- 'libGLESv2/main.h',
- 'libGLESv2/mathutil.h',
- 'libGLESv2/Program.cpp',
- 'libGLESv2/Program.h',
- 'libGLESv2/Renderbuffer.cpp',
- 'libGLESv2/Renderbuffer.h',
- 'libGLESv2/Shader.cpp',
- 'libGLESv2/Shader.h',
- 'libGLESv2/Texture.cpp',
- 'libGLESv2/Texture.h',
- 'libGLESv2/utilities.cpp',
- 'libGLESv2/utilities.h',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
- 'AdditionalDependencies': ['d3dx9.lib'],
- }
- },
- },
- {
- 'target_name': 'libEGL',
- 'type': 'shared_library',
- 'dependencies': ['libGLESv2'],
- 'include_dirs': [
- '.',
- '../include',
- ],
- 'sources': [
- 'common/angleutils.h',
- 'common/debug.cpp',
- 'common/debug.h',
- 'libEGL/Config.cpp',
- 'libEGL/Config.h',
- 'libEGL/Display.cpp',
- 'libEGL/Display.h',
- 'libEGL/libEGL.cpp',
- 'libEGL/libEGL.def',
- 'libEGL/main.cpp',
- 'libEGL/main.h',
- 'libEGL/Surface.cpp',
- 'libEGL/Surface.h',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalDependencies': ['d3d9.lib'],
- }
- },
- },
+ }],
],
}