######################################################################################## # 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. # ######################################################################################## from waflib import Configure def build(bld): import lumberyard_sdks # 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' physxcharacters_file_list = [] physxcharacters_file_list_editor = [] pch_file = "Source/PhysXCharacters_precompiled.cpp" if bld.env['PLATFORM'] == 'project_generator' or isinstance(bld,Configure.ConfigurationContext): physxcharacters_file_list.extend(['physxcharacters.waf_files', 'physxcharacters_unsupported.waf_files']) physxcharacters_file_list_editor.extend(['physxcharacters.waf_files', 'physxcharacters_editor.waf_files', 'physxcharacters_unsupported.waf_files']) else: if bld.check_platform_uselib_compatibility(physx_sdk_lib): physxcharacters_file_list.extend(['physxcharacters.waf_files']) physxcharacters_file_list_editor.extend(['physxcharacters.waf_files', 'physxcharacters_editor.waf_files']) else: physxcharacters_file_list.extend(['physxcharacters_unsupported.waf_files']) physxcharacters_file_list_editor.extend(['physxcharacters_unsupported.waf_files']) pch_file = "Source/PhysXCharactersUnsupported_precompiled.cpp" bld.DefineGem( file_list = physxcharacters_file_list, platforms = ['all'], includes = [bld.Path('Gems/PhysX/Code/Include')], test_all_includes = [bld.Path('Code/Framework/Tests')], pch = pch_file, use = ['AzFramework'], uselib = [physx_sdk_lib], test_all_use = ['AzPhysicsTests', 'AzTestShared'], win_features = ['crcfix'], editor = dict( file_list = physxcharacters_file_list_editor, defines = ['PHYSX_CHARACTERS_EDITOR'], includes = [bld.Path('Code/Framework/AzToolsFramework'), bld.Path('Code/Tools'), bld.Path('Code/Sandbox/Editor')], test_all_includes = [bld.Path('Code/Framework/Tests')], use = ['AzFramework', 'SceneCore', 'SceneData'], test_all_use = ['AzPhysicsTests'], uselib = ['QT5CORE', physx_sdk_lib], win_features = ['crcfix'] ) )