######################################################################################## # # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or # a third party where indicated. # # 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. # ######################################################################################## from waflib import Configure def build(bld): # PhysX has global pointers for referencing the PhysX SDK. These pointers need to exist in a single memory # space so different Gems can get copies of them. Monolithic builds will use the static version of PhysX SDK libraries, # which results in a single memory space. Non-monolithic builds will use the dynamic version of PhysX SDK libraries, # which also works because different Gems will be using the shared library's memory space. if bld.is_build_monolithic(): physx_sdk_lib = 'PHYSX_SDK' else: physx_sdk_lib = 'PHYSX_SDK_SHARED' #Bit 0 is already reserved by the PhysX Gem as the "default" layer. #The TouchBending layer can be a number from 1 to 63. #REMARK: If the file "default.physxconfiguration" already existed #under the current game project folder, you should delete it whenever #this bit changes value. physx_layer_bit = 'TOUCHBENDING_LAYER_BIT=1' touchbending_file_list = [] touchbending_file_list_editor = [] pch_file = "Source/TouchBending_precompiled.cpp" if bld.env['PLATFORM'] == 'project_generator' or isinstance(bld,Configure.ConfigurationContext): touchbending_file_list.extend(['touchbending.waf_files', 'touchbending_unsupported.waf_files']) touchbending_file_list_editor.extend(['touchbending.waf_files', 'touchbending_editor.waf_files', 'touchbending_unsupported.waf_files']) else: if bld.check_platform_uselib_compatibility(physx_sdk_lib): touchbending_file_list.extend(['touchbending.waf_files']) touchbending_file_list_editor.extend(['touchbending.waf_files', 'touchbending_editor.waf_files']) else: touchbending_file_list.extend(['touchbending_unsupported.waf_files']) touchbending_file_list_editor.extend(['touchbending_unsupported.waf_files']) pch_file = "Source/TouchBendingUnsupported_precompiled.cpp" bld.DefineGem( # General file_list = touchbending_file_list, # Testing test_all_file_list = ['touchbending_tests.waf_files'], test_all_includes = [bld.Path('Code/Framework/Tests')], test_all_use = ['AzPhysicsTests'], pch = pch_file, use = ['AzFramework'], uselib = [physx_sdk_lib], win_features = ['crcfix'], use_required_gems = True, includes = [bld.Path('Code/CryEngine/CryCommon') ], export_defines = [physx_layer_bit], debug_export_defines = ['TOUCHBENDING_VISUALIZE_ENABLED'], profile_export_defines = ['TOUCHBENDING_VISUALIZE_ENABLED'], # Section to control the editor (things related with asset pipeline, etc) build. Editor = dict( platforms = ['win', 'darwin', 'linux'], # General file_list = touchbending_file_list_editor, #Testing test_all_file_list = ['touchbending_tests.waf_files'], test_all_includes = [bld.Path('Code/Framework/Tests')], test_all_use = ['AzPhysicsTests'], # Additional options to override for the editor module, for example, defines = ["TOUCHBENDING_EDITOR"], includes = [bld.Path('Code/Tools'), bld.Path('Code/CryEngine/CryCommon') ], pch = pch_file, use = ['AzFramework','SceneCore', 'SceneData'], uselib = [physx_sdk_lib], win_features = ['crcfix'], use_required_gems = True, export_defines = [physx_layer_bit], debug_export_defines = ['TOUCHBENDING_VISUALIZE_ENABLED'], profile_export_defines = ['TOUCHBENDING_VISUALIZE_ENABLED'], ) )