######################################################################################## # 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. # ######################################################################################## def build(bld): exclude_monolithic_metal = False if bld.is_option_true('use_other_in_monolithic'): exclude_monolithic_metal = True #============================== # Build CryRenderMetal #============================== bld.CryEngineModule( # Settings target = 'CryRenderMetal', vs_filter = 'CryEngine', file_list = [ 'metal_renderer.waf_files', 'metal_mesh_baker.waf_files' ], platforms = [ 'ios', 'appletv', 'darwin'], exclude_monolithic = exclude_monolithic_metal, configurations = ['all'], client_only = True, pch = '../../StdAfx.cpp', use = ['AzFramework'], uselib = ['LZMA', 'LZSS'], includes = [ bld.Path('Code/CryEngine/CryCommon'), '../..', bld.Path('Code/CryEngine/RenderDll/XRenderD3D9'), bld.Path('Code/CryEngine/RenderDll/Common'), bld.Path('Code/CryEngine/RenderDll'), bld.Path('Code/Tools/HLSLCrossCompilerMETAL/include') ], defines = [ 'DO_RENDERLOG', 'DO_RENDERSTATS', 'DIRECT3D10', 'XRENDERGL_EXPORTS', '_RENDERER', 'DXSDK="'+bld.Path('Code/SDKs/DXSDK/Include')+'/"', 'USE_CRY_NEW_AND_DELETE', 'OPENGL', 'CRY_USE_METAL'], # Defining this will get StdAfx.h to include the correct header file for OpenGl/Metal lib = [ 'HLSLcc' ], # Platform Specific ios_cxxflags = [ '-x', 'objective-c++', '-Wno-c++11-narrowing' ], ios_libpath = [ bld.Path('Code/Tools/HLSLCrossCompiler/lib/ios') ], ios_framework = [ 'Metal', 'CoreGraphics', 'OpenGLES' ], appletv_cxxflags = [ '-x', 'objective-c++', '-Wno-c++11-narrowing' ], appletv_libpath = [ bld.Path('Code/Tools/HLSLCrossCompiler/lib/ios') ], appletv_framework = [ 'Metal', 'CoreGraphics', 'OpenGLES' ], darwin_cxxflags = [ '-x', 'objective-c++', '-Wno-c++11-narrowing' ], darwin_libpath = [ bld.Path('Code/Tools/HLSLCrossCompiler/lib/mac') ], darwin_framework = [ 'Metal', 'CoreGraphics', 'CoreServices', 'QuartzCore' ], test_all_file_list = ['metal_test.waf_files'], )