diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs index 4d19b9625..47546c4ba 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs @@ -1383,6 +1383,8 @@ private IEnumerable GetIncludePathsImpl(IGenerationContext context) includePaths.AddRange(conf.IncludePrivatePaths); includePaths.AddRange(conf.IncludePaths); includePaths.AddRange(conf.DependenciesIncludePaths); + includePaths.AddRange(conf.IncludeSystemPaths); + includePaths.AddRange(conf.DependenciesIncludeSystemPaths); includePaths.Sort(); return includePaths; @@ -1390,7 +1392,8 @@ private IEnumerable GetIncludePathsImpl(IGenerationContext context) private IEnumerable GetPlatformIncludePathsWithPrefixImpl(IGenerationContext context) { - yield break; + const string cmdLineIncludePrefix = "-isystem"; + return context.Configuration.DependenciesIncludeSystemPaths.Select(includePath => new IncludeWithPrefix(cmdLineIncludePrefix, includePath)); } private IEnumerable GetResourceIncludePathsImpl(IGenerationContext context) diff --git a/samples/HelloXCode/codebase/dll1/dll1.sharpmake.cs b/samples/HelloXCode/codebase/dll1/dll1.sharpmake.cs index 28d1e6702..1498509a8 100644 --- a/samples/HelloXCode/codebase/dll1/dll1.sharpmake.cs +++ b/samples/HelloXCode/codebase/dll1/dll1.sharpmake.cs @@ -31,6 +31,7 @@ public override void ConfigureAll(Configuration conf, CommonTarget target) conf.IncludePaths.Add(SourceRootPath); conf.AddPrivateDependency(target); + conf.IncludeSystemPaths.Add("[project.SourceRootPath]/systemincludedll"); } public override void ConfigureMac(Configuration conf, CommonTarget target) diff --git a/samples/HelloXCode/codebase/dll1/systemincludedll/systemincludedll.h b/samples/HelloXCode/codebase/dll1/systemincludedll/systemincludedll.h new file mode 100644 index 000000000..6dc347c3e --- /dev/null +++ b/samples/HelloXCode/codebase/dll1/systemincludedll/systemincludedll.h @@ -0,0 +1,4 @@ +inline void SystemIncludeDllFct() +{ + +} \ No newline at end of file diff --git a/samples/HelloXCode/codebase/exe/exe.sharpmake.cs b/samples/HelloXCode/codebase/exe/exe.sharpmake.cs index cdb9997d6..8547b8c3c 100644 --- a/samples/HelloXCode/codebase/exe/exe.sharpmake.cs +++ b/samples/HelloXCode/codebase/exe/exe.sharpmake.cs @@ -27,6 +27,7 @@ public override void ConfigureAll(Configuration conf, CommonTarget target) conf.AddPrivateDependency(target); conf.Defines.Add("CREATION_DATE=\"July 2020\""); + conf.IncludeSystemPaths.Add("[project.SourceRootPath]/systeminclude"); } } } diff --git a/samples/HelloXCode/codebase/exe/main.cpp b/samples/HelloXCode/codebase/exe/main.cpp index 4e7ba88af..cc0c1f045 100644 --- a/samples/HelloXCode/codebase/exe/main.cpp +++ b/samples/HelloXCode/codebase/exe/main.cpp @@ -4,6 +4,8 @@ #include "sub folder/useless_static_lib2.h" #include +#include "systeminclude.h" +#include "systemincludedll.h" int main(int, char**) { @@ -21,5 +23,7 @@ int main(int, char**) Util2 utilityStatic; utilityStatic.DoSomethingUseful(); StaticLib2::UselessMethod(); + SystemFct(); + SystemIncludeDllFct(); return 0; } diff --git a/samples/HelloXCode/codebase/exe/systeminclude/systeminclude.h b/samples/HelloXCode/codebase/exe/systeminclude/systeminclude.h new file mode 100644 index 000000000..b6bd687e9 --- /dev/null +++ b/samples/HelloXCode/codebase/exe/systeminclude/systeminclude.h @@ -0,0 +1,5 @@ +// Dummy file +inline void SystemFct() +{ + +} \ No newline at end of file