awtk/3rd/bgfx/SConscript

75 lines
2.7 KiB
Python
Raw Normal View History

2018-11-09 18:46:34 +08:00
import os
import platform
BgCppPath=[]
BgSources=[]
env=DefaultEnvironment().Clone()
OS_NAME=platform.system()
LIB_DIR=os.environ['LIB_DIR'];
CCFLAGS=os.environ['CCFLAGS'];
BgCppPath=['bx/3rdparty',
2018-11-28 10:09:01 +08:00
'bx/include',
'bimg/include',
'bgfx/3rdparty',
'bgfx/3rdparty/khronos',
2019-02-27 09:39:49 +08:00
'bimg/3rdparty/astc-codec/include',
2019-03-05 16:07:21 +08:00
'bimg/3rdparty/astc-codec/',
2018-11-28 10:09:01 +08:00
'bgfx/include']
2018-11-09 18:46:34 +08:00
BgSources=[
2018-11-28 10:09:01 +08:00
'bx/src/allocator.cpp',
'bx/src/bx.cpp',
'bx/src/commandline.cpp',
'bx/src/crtnone.cpp',
'bx/src/debug.cpp',
'bx/src/dtoa.cpp',
'bx/src/easing.cpp',
'bx/src/file.cpp',
'bx/src/filepath.cpp',
'bx/src/hash.cpp',
'bx/src/math.cpp',
'bx/src/mutex.cpp',
'bx/src/os.cpp',
'bx/src/process.cpp',
'bx/src/semaphore.cpp',
'bx/src/settings.cpp',
'bx/src/string.cpp',
'bx/src/sort.cpp',
'bx/src/thread.cpp',
'bx/src/timer.cpp',
'bx/src/url.cpp',
'bimg/src/image.cpp',
'bimg/src/image_gnf.cpp',
'bgfx/src/bgfx.cpp',
'bgfx/src/debug_renderdoc.cpp',
'bgfx/src/dxgi.cpp',
'bgfx/src/glcontext_egl.cpp',
'bgfx/src/glcontext_glx.cpp',
'bgfx/src/glcontext_wgl.cpp',
'bgfx/src/nvapi.cpp',
'bgfx/src/renderer_d3d11.cpp',
'bgfx/src/renderer_d3d12.cpp',
'bgfx/src/renderer_d3d9.cpp',
'bgfx/src/renderer_gl.cpp',
2019-05-22 09:21:03 +08:00
'bgfx/src/renderer_nvn.cpp',
2018-11-28 10:09:01 +08:00
'bgfx/src/renderer_gnm.cpp',
'bgfx/src/renderer_noop.cpp',
'bgfx/src/renderer_vk.cpp',
'bgfx/src/shader.cpp',
'bgfx/src/shader_dx9bc.cpp',
'bgfx/src/shader_dxbc.cpp',
'bgfx/src/shader_spirv.cpp',
'bgfx/src/topology.cpp',
'bgfx/src/vertexdecl.cpp'
2019-03-05 16:07:21 +08:00
] + Glob("bimg/3rdparty/astc-codec/src/decoder/*.cc")
2018-11-09 18:46:34 +08:00
if OS_NAME == 'Windows':
2018-11-28 10:09:01 +08:00
CCFLAGS = CCFLAGS + ' /std:c++14 ';
BgCppPath = BgCppPath + ['bx/include/compat/msvc','bgfx/3rdparty/dxsdk/include']
2018-11-09 18:46:34 +08:00
elif OS_NAME == 'Darwin':
2018-11-28 10:09:01 +08:00
CCFLAGS = CCFLAGS + ' -std=c++14 '
BgCppPath= BgCppPath + ['bx/include/compat/osx']
BgSources= BgSources + ['bgfx/src/renderer_mtl.mm']
2018-11-09 18:46:34 +08:00
env.Library(os.path.join(LIB_DIR, 'bgfx'), BgSources, CPPPATH = BgCppPath,CCFLAGS = CCFLAGS)