########################################################################################
# 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.
#
#
# Original file Copyright Crytek GMBH or its affiliates, used under license.
#
########################################################################################


def build(bld):

    bld.CryEditorUiQt(
        # Settings
        target              = 'EditorUI_QT',
        vs_filter           = 'Sandbox/Plugins',
        file_list           = 'editorui_qt.waf_files',
        darwin_file_list    = 'editorui_qt_darwin.waf_files',
        linux_file_list     = 'editorui_qt_linux.waf_files',
        win_file_list       = 'editorui_qt_win.waf_files',
        platforms           = ['win', 'darwin', 'linux'],
        configurations      = ['all'],
        exclude_monolithic  = True,
        client_only         = True,
        features            = ['qt5'],
        includes            = [ '.',
                                bld.Path('Code/CryEngine/CryCommon'),
                                '..',
                                bld.Path('Code/Sandbox/Editor'),
                                bld.Path('Code/Sandbox/Editor/Include')],
        use                 = ['CryCommon',
                               'EditorCommon',
                               'EditorCore'],
        uselib              = ['QTANGLE',
                               'QT5CORE',
                               'QT5GUI',
                               'QTMAIN',
                               'QT5WIDGETS',
                               'QT5XML',
                               'BOOST'],
        defines             = ['EDITOR_COMMON_IMPORTS'],
        darwin_uselib       = ['QT5MACEXTRAS'],
        darwin_enable_rtti  = True,

        clang_cxxflags      = ['-Wno-char-subscripts', '-Wno-enum-compare-switch'],
        msvc_cxxflags       = ['/wd4251'],
        linux_rpath         = ['$ORIGIN/qtlibs/lib'],

        # Testing
        test_all_file_list = ['editorui_qt_test.waf_files'],
    )