summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/godotsharp_export.cpp
diff options
context:
space:
mode:
authorShyRed <ShyRed@users.noreply.github.com>2019-05-09 19:54:56 +0200
committerShyRed <ShyRed@users.noreply.github.com>2019-05-26 08:07:55 +0200
commit60e711a1155141d840f0223e1994b7a444cfdd5a (patch)
treeaec3de51966d3c3d67009bfbfc00db62eaae7da3 /modules/mono/editor/godotsharp_export.cpp
parent0d8f1ba6a9182d1f1af39097e2165fc9807377f5 (diff)
downloadredot-engine-60e711a1155141d840f0223e1994b7a444cfdd5a.tar.gz
Add Godot constants to Mono project builds
This adds constants to projects build via Godot Mono which allows project to conditionally react to different operating systems and 32/64 Bit architecture. Additionally .NET libraries could support multiple engines like Unity and Godot at the same time when compiled from Godot and reacting to definitions.
Diffstat (limited to 'modules/mono/editor/godotsharp_export.cpp')
-rw-r--r--modules/mono/editor/godotsharp_export.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/mono/editor/godotsharp_export.cpp b/modules/mono/editor/godotsharp_export.cpp
index ee5fed1a0c..ae5b939b26 100644
--- a/modules/mono/editor/godotsharp_export.cpp
+++ b/modules/mono/editor/godotsharp_export.cpp
@@ -94,7 +94,12 @@ void GodotSharpExport::_export_begin(const Set<String> &p_features, bool p_debug
ERR_FAIL_COND(!_add_file(scripts_metadata_path, scripts_metadata_path));
- ERR_FAIL_COND(!GodotSharpBuilds::build_project_blocking(build_config));
+ // Turn export features into defines
+ Vector<String> godot_defines;
+ for (Set<String>::Element *E = p_features.front(); E; E = E->next()) {
+ godot_defines.push_back(E->get());
+ }
+ ERR_FAIL_COND(!GodotSharpBuilds::build_project_blocking(build_config, godot_defines));
// Add dependency assemblies