Import('env')
Import('env_modules')

env_world = env_modules.Clone()

# TODO Exclude editor stuff when building an export template?
files = [
	"*.cpp",
	"mesher/*.cpp",
	"thirdparty/meshoptimizer/*.cpp",
	"thirdparty/RVO2-3D/*.cpp"
]

for f in files:
	env_world.add_source_files(env.modules_sources, f)

env_world.Append(CPPDEFINES=["MESHOPTIMIZER_ZYLANN_NEVER_COLLAPSE_BORDERS"])

# Ignored clang warnings because Godot's codebase is old and isn't using override yet
if env['platform'] == 'osx' or env['platform'] == 'android':
    env_world.Append(CXXFLAGS=['-Wno-inconsistent-missing-override'])

