|
@@ -1351,6 +1351,8 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
|
|
|
Vector<String> added_embedded_dependenciy_names;
|
|
|
HashMap<String, String> plist_values;
|
|
|
|
|
|
+ Set<String> plugin_linker_flags;
|
|
|
+
|
|
|
Error err;
|
|
|
|
|
|
for (int i = 0; i < enabled_plugins.size(); i++) {
|
|
@@ -1417,6 +1419,13 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
|
|
|
p_config_data.capabilities.push_back(capability);
|
|
|
}
|
|
|
|
|
|
+ // Linker flags
|
|
|
+ // Checking duplicates
|
|
|
+ for (int j = 0; j < plugin.linker_flags.size(); j++) {
|
|
|
+ String linker_flag = plugin.linker_flags[j];
|
|
|
+ plugin_linker_flags.insert(linker_flag);
|
|
|
+ }
|
|
|
+
|
|
|
// Plist
|
|
|
// Using hash map container to remove duplicates
|
|
|
const String *K = nullptr;
|
|
@@ -1497,6 +1506,27 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
|
|
|
|
|
|
p_config_data.cpp_code += plugin_cpp_code.format(plugin_format, "$_");
|
|
|
}
|
|
|
+
|
|
|
+ // Update Linker Flag Values
|
|
|
+ {
|
|
|
+ String result_linker_flags = " ";
|
|
|
+ for (Set<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) {
|
|
|
+ const String &flag = E->get();
|
|
|
+
|
|
|
+ if (flag.length() == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (result_linker_flags.length() > 0) {
|
|
|
+ result_linker_flags += ' ';
|
|
|
+ }
|
|
|
+
|
|
|
+ result_linker_flags += flag;
|
|
|
+ }
|
|
|
+ result_linker_flags = result_linker_flags.replace("\"", "\\\"");
|
|
|
+ p_config_data.linker_flags += result_linker_flags;
|
|
|
+ }
|
|
|
+
|
|
|
return OK;
|
|
|
}
|
|
|
|