summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2022-03-24 21:01:09 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2022-04-03 20:39:34 (GMT)
commit53ca6edd8aefcb6456755f2de48d2d1375d6df7f (patch)
tree9657713940092155470eac78ce7cfb84b16c3fa8 /Source/cmLocalXCodeGenerator.cxx
parent183b6bbf51d40be9a0d54e351538c6413ad41407 (diff)
downloadCMake-53ca6edd8aefcb6456755f2de48d2d1375d6df7f.zip
CMake-53ca6edd8aefcb6456755f2de48d2d1375d6df7f.tar.gz
CMake-53ca6edd8aefcb6456755f2de48d2d1375d6df7f.tar.bz2
xcode: add support for xcconfig files
Fixes: #18420
Diffstat (limited to 'Source/cmLocalXCodeGenerator.cxx')
-rw-r--r--Source/cmLocalXCodeGenerator.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index dd064a1..e7a1f93 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -6,6 +6,7 @@
#include <ostream>
#include <utility>
+#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalXCodeGenerator.h"
#include "cmMakefile.h"
@@ -134,3 +135,22 @@ void cmLocalXCodeGenerator::ComputeObjectFilenames(
si.second = objectName;
}
}
+
+void cmLocalXCodeGenerator::AddXCConfigSources(cmGeneratorTarget* target)
+{
+ auto xcconfig = target->GetProperty("XCODE_XCCONFIG");
+ if (!xcconfig) {
+ return;
+ }
+ auto configs = target->Makefile->GetGeneratorConfigs(
+ cmMakefile::IncludeEmptyConfig);
+
+ for (auto& config : configs) {
+ auto file = cmGeneratorExpression::Evaluate(
+ xcconfig,
+ this, config);
+ if (!file.empty()) {
+ target->AddSource(file);
+ }
+ }
+}