######################################################################################## # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or the license accompanying this file. Do not # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # # Original file Copyright Crytek GMBH or its affiliates, used under license. # ######################################################################################## import os from runpy import run_path def build(bld): exclude_monolithic_gl = False if bld.is_option_true('use_other_in_monolithic'): exclude_monolithic_gl = True restricted_scripts = {} for p0, p1, p2, p3 in bld.env['RESTRICTED_PLATFORMS']: platform_wscript = os.path.join(bld.path.abspath(), p0, 'wscript_{0}'.format(p1)) if os.path.exists(platform_wscript): restricted_scripts[p3] = run_path(platform_wscript) exclude_monolithic_gl = False if bld.is_option_true('use_other_in_monolithic'): exclude_monolithic_gl = True #============================== # Build CryRenderGL #============================== kw = dict( # Settings target = 'CryRenderGL', vs_filter = 'CryEngine', copyright_org = 'Amazon-CryTek', file_list = ['../core_renderer.waf_files', 'opengl_renderer.waf_files' ], platforms = ['win', 'android', 'linux'], configurations = ['debug', 'debug_test', 'profile', 'profile_test', 'linux:performance', 'linux:release', 'android:performance', 'android:release', 'darwin:performance', 'darwin:release'], exclude_monolithic = exclude_monolithic_gl, pch = '../../StdAfx.cpp', use = ['AzFramework'], uselib = ['LZMA', 'LZSS', 'LZ4', 'AMD_SHARED', 'NVAPI', 'GLAD'], includes = [ bld.Path('Code/CryEngine/CryCommon'), '..', '../..', bld.Path('Code/Tools/HLSLCrossCompiler/include'), bld.Path('Code/CryEngine/RenderDll/Common'), bld.ThirdPartyPath('squish'), './Specification' ], defines = [ 'DO_RENDERLOG', 'DO_RENDERSTATS', 'DIRECT3D10', 'XRENDERGL_EXPORTS', '_RENDERER', 'EXCLUDE_CINEMIZER_SDK', 'OPENGL', 'USE_CRY_NEW_AND_DELETE' ], # Compiler Specific win_x64_clang_cxxflags = [ '-Wno-microsoft-unqualified-friend', '-Wno-deprecated-declarations', '-Wno-sometimes-uninitialized', '-Wno-shift-negative-value', '-Wno-null-dereference', '-Wno-array-bounds', '-Wno-return-type', '-Wno-enum-compare-switch'], linux_x64_cxxflags = [ '-Wno-c++11-narrowing'], # Platform Specific win_file_list = ['opengl_mesh_baker.waf_files'], win_includes = ['.', bld.Path('Code/Tools/HLSLCrossCompiler/include'), bld.ThirdPartyPath('squish')], win_lib = ['opengl32', 'winmm', 'Ole32', 'Gdi32', 'wininet', 'Shell32', 'ws2_32', 'libHLSLcc' ], win_libpath = [ bld.Path('Code/Tools/HLSLCrossCompiler/lib/win64') ], android_includes = [ bld.Path('Code/Tools/HLSLCrossCompiler/include') ], android_lib = [ 'GLESv2', 'EGL' ], android_file_list = ['opengl_mesh_baker.waf_files'], linux_includes = [ bld.Path('Code/Tools/HLSLCrossCompiler/include') ], linux_lib = [ 'X11', 'GL', 'EGL' ], linux_file_list = ['opengl_mesh_baker.waf_files'], # Testing test_all_file_list = ['opengl_test.waf_files'], ) for p in restricted_scripts: if 'update_opengl_restricted_parameters' in restricted_scripts[p]: restricted_scripts[p]['update_opengl_restricted_parameters'](bld, kw) bld.CryEngineModule(**kw)