Allow additional cpp files to be added for export template

This commit is contained in:
Sergey Minakov 2021-07-13 22:17:17 +03:00
parent 78c8b7ffec
commit fa2983c18b
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ if env["tools"]:
reg_exporters_inc = '#include "register_exporters.h"\n'
reg_exporters = "void register_exporters() {\n"
for e in env.platform_exporters:
env.add_source_files(env.editor_sources, "#platform/" + e + "/export/export.cpp")
# Glob all .cpp files in export folder
files = Glob("#platform/" + e + "/export/" + "*.cpp")
env.add_source_files(env.editor_sources, files)
reg_exporters += "\tregister_" + e + "_exporter();\n"
reg_exporters_inc += '#include "platform/' + e + '/export/export.h"\n'
reg_exporters += "}\n"