[Plugin] Unable to compile plugin cause PublicIncludePaths are simply ignored

I’ve got a third party code that I need to include into UE4 project. I decided to create a plugin that holds git submodule. So the structure of plugin is: MyGame/Plugins/MyPlugin/Source/:
[INDENT=2]Public:[/INDENT]
[INDENT=3]MyPlugin.h[/INDENT]
[INDENT=2]Private:[/INDENT]
[INDENT=3]MyPlugin.cpp[/INDENT]
[INDENT=2]MySubmodule:[/INDENT]
[INDENT=3]inc:[/INDENT]
[INDENT=4].hpp[/INDENT]
[INDENT=3]src:[/INDENT]
[INDENT=4]
.cpp[/INDENT]
[INDENT=3]some_useless_folder:[/INDENT]
[INDENT=4]matlab files[/INDENT]
I Added the following code into MyPlugin.Build.cs


 PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(new string] { Path.Combine(ModuleDirectory, "Public"), Path.Combine(ModuleDirectory, "MDGeom/inc"), });
PrivateIncludePaths.AddRange(new string] { Path.Combine(ModuleDirectory, "Private"), });
CppStandard = CppStandardVersion.Cpp17;
 

But ue4 just ignores any settings and tries to compile matlab files as cpp files. How the hell make such an easy thing working in ue4 project without no need to manually copy needed files to Public/Private folders?