######################################################################################## # 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' physxdebug_file_list = [] pch_file = "Source/PhysXDebug_precompiled.cpp" if bld.env['PLATFORM'] == 'project_generator' or isinstance(bld,Configure.ConfigurationContext): physxdebug_file_list.extend(['physxdebug.waf_files', 'physxdebug_unsupported.waf_files']) else: if bld.check_platform_uselib_compatibility(physx_sdk_lib): physxdebug_file_list.extend(['physxdebug.waf_files']) else: physxdebug_file_list.extend(['physxdebug_unsupported.waf_files']) pch_file = "Source/PhysXDebugUnsupported_precompiled.cpp" bld.DefineGem( file_list = physxdebug_file_list, defines = ['IMGUI_ENABLED'], platforms = ['all'], pch = pch_file, use = ['imguilib'], includes = [bld.Path('Code/CryEngine/CryCommon')], uselib = [physx_sdk_lib], editor = dict( platforms = ['win','darwin','linux'], defines = ['PHYSXDEBUG_GEM_EDITOR', 'IMGUI_ENABLED'], includes = [bld.Path('Code/CryEngine/CryCommon'), bld.Path('Code/Sandbox/Plugins/EditorCommon'), bld.Path('Code/Sandbox/Editor')], use = ['imguilib'], uselib = [physx_sdk_lib] ) )