########################################################################################
# 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):
    if bld.is_build_monolithic():
        physx_sdk_lib = 'PHYSX_SDK'
    else:
        physx_sdk_lib = 'PHYSX_SDK_SHARED'

    bld.DefineGem(
        # Add custom build options here
        disable_pch             = True,
        includes                = [ 'Include'
                                  , 'Source'
                                  , 'Tests/Mocks'
                                  , bld.Path('Gems/PhysX/Code/Include/') # for LY -> PhysX conversions
                                  , bld.Path('Code/CryEngine/CryCommon')
                                  , bld.Path('Code/Framework/AzToolsFramework')
                                  ],
        win_test_file_list      = [ 'blast_tests_supported.waf_files' ],
        uselib                  = [ 'BLAST_LIB', physx_sdk_lib ],
        use                     = [ 'PHYSX', 'LmbrCentral' ],
        platform_roots          = [ bld.PlatformRoot('Platform', export_includes=False) ],

        editor = dict(
            disable_pch         = True,
            defines             = [ 'BLAST_EDITOR' ],
            includes            = [ bld.Path('Code/Sandbox')
                                  , bld.Path('Code/Sandbox/Editor')
                                  , bld.Path('Code/Sandbox/Editor/Include')
                                  , bld.Path('Gems/LmbrCentral/Code/Include')
                                  , bld.Path('Gems/LmbrCentral/Code/Source')
                                  , bld.Path('Code/CryEngine/CryCommon')
                                  , bld.Path('Gems/PhysX/Code/Include/')
                                  , bld.Path('Code/Tools')
                                  ],
            win_file_list       = [ 'blast_supported.waf_files', 'blast_editor_supported.waf_files' ],
            darwin_file_list    = [ 'blast_unsupported.waf_files' ],
            linux_file_list     = [ 'blast_unsupported.waf_files' ],
            win_test_file_list  = [ 'blast_tests_editor_supported.waf_files' ],            
            uselib              = [ 'BLAST_LIB', physx_sdk_lib],
            use                 = [ 'AzToolsFramework'
                                  , 'AzQtComponents'
                                  , 'EditorCore'
                                  , 'LmbrCentral'
                                  , 'LmbrCentral.Editor'
                                  , 'EditorCommon'
                                  , 'AzFramework'
                                  , 'PHYSX'
                                  , 'SceneData'
                                  , 'SceneCore'
                                  ]
        ),
    )