2016-05-01 15:00:02 +02:00
|
|
|
Import('env')
|
2019-05-30 00:45:19 +01:00
|
|
|
Import('env_modules')
|
2016-05-01 15:00:02 +02:00
|
|
|
|
2019-05-30 00:45:19 +01:00
|
|
|
env_voxel = env_modules.Clone()
|
2016-05-01 15:00:02 +02:00
|
|
|
|
2019-05-30 00:45:19 +01:00
|
|
|
files = [
|
|
|
|
"*.cpp",
|
|
|
|
"meshers/blocky/*.cpp",
|
|
|
|
"meshers/transvoxel/*.cpp",
|
|
|
|
"meshers/dmc/*.cpp",
|
2020-09-11 00:36:23 +01:00
|
|
|
"meshers/cubes/*.cpp",
|
2019-05-30 00:45:19 +01:00
|
|
|
"meshers/*.cpp",
|
|
|
|
"streams/*.cpp",
|
2020-09-14 19:33:02 +01:00
|
|
|
"storage/*.cpp",
|
2020-01-26 22:34:26 +00:00
|
|
|
"generators/*.cpp",
|
2020-02-19 19:26:14 +00:00
|
|
|
"generators/graph/*.cpp",
|
2020-12-18 21:19:02 +00:00
|
|
|
"generators/simple/*.cpp",
|
2019-05-30 00:45:19 +01:00
|
|
|
"util/*.cpp",
|
|
|
|
"terrain/*.cpp",
|
2020-08-24 01:49:23 +01:00
|
|
|
"server/*.cpp",
|
2019-08-17 18:15:16 +01:00
|
|
|
"math/*.cpp",
|
2020-01-26 20:29:44 +00:00
|
|
|
"edition/*.cpp",
|
2019-08-24 23:07:17 +01:00
|
|
|
"thirdparty/lz4/*.c"
|
2019-05-30 00:45:19 +01:00
|
|
|
]
|
|
|
|
|
2020-12-04 22:01:41 +00: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'])
|
2019-08-23 22:49:43 +01:00
|
|
|
|
|
|
|
# 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'])
|