godot_voxel/SCsub

54 lines
1.3 KiB
Plaintext
Raw Normal View History

Import('env')
2019-05-30 00:45:19 +01:00
Import('env_modules')
2019-05-30 00:45:19 +01:00
env_voxel = env_modules.Clone()
2019-05-30 00:45:19 +01:00
files = [
"*.cpp",
"meshers/blocky/*.cpp",
"meshers/transvoxel/*.cpp",
"meshers/dmc/*.cpp",
"meshers/cubes/*.cpp",
2019-05-30 00:45:19 +01:00
"meshers/*.cpp",
"streams/*.cpp",
"storage/*.cpp",
"generators/*.cpp",
"generators/graph/*.cpp",
"generators/simple/*.cpp",
2019-05-30 00:45:19 +01:00
"util/*.cpp",
"terrain/*.cpp",
"server/*.cpp",
"math/*.cpp",
"edition/*.cpp",
2019-08-24 23:07:17 +01:00
"thirdparty/lz4/*.c"
2019-05-30 00:45:19 +01:00
]
if env["tools"]:
# Editor-only stuff
editor_files = [
"editor/*.cpp",
"editor/graph/*.cpp",
"editor/terrain/*.cpp",
]
files += editor_files
2019-05-30 00:45:19 +01:00
for f in files:
env_voxel.add_source_files(env.modules_sources, f)
2020-03-28 23:20:49 +08:00
# Ignored clang warnings because Godot's codebase is old and isn't using override yet
if env['platform'] == 'osx' or env['platform'] == 'android':
env_voxel.Append(CXXFLAGS=['-Wno-inconsistent-missing-override'])
2019-05-30 00:45:19 +01:00
# Doesn't work, because reasons
#if env.msvc:
# env_voxel.Append(CXXFLAGS=['/std:c++17'])
#else:
# env_voxel.Append(CXXFLAGS=['-std=c++17'])
# This also doesn't work, since the rest of Godot doesn't use this, linking fails.
# No safe STL boundary checks for you.
#if env['target'] == 'debug':
# if env.msvc:
# # Enable STL bound checks, Godot's master environment doesn't do it
# env_voxel.Append(CXXFLAGS=['/D_DEBUG'])