Xcode: Use explicitFileType to mark source types (#14093)
Replace use of lastKnownFileType with explicitFileType to insist that Xcode treat the file as we ask.
This commit is contained in:
parent
201db269b8
commit
5683146185
|
@ -56,7 +56,7 @@
|
||||||
2C18F0B415DC1DC700593670 = {
|
2C18F0B415DC1DC700593670 = {
|
||||||
fileEncoding = 30;
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
lastKnownFileType = @id_type@;
|
explicitFileType = @id_type@;
|
||||||
path = @id_src@;
|
path = @id_src@;
|
||||||
refType = 4;
|
refType = 4;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
|
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
|
||||||
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
|
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; explicitFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
|
||||||
8DD76F6C0486A84900D96B5E = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CompilerId@id_lang@; sourceTree = BUILT_PRODUCTS_DIR; };
|
8DD76F6C0486A84900D96B5E = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CompilerId@id_lang@; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
|
||||||
08FB7794FE84155DC02AAC07 = {
|
08FB7794FE84155DC02AAC07 = {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
|
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
|
||||||
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
|
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; explicitFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
|
||||||
08FB7794FE84155DC02AAC07 = {
|
08FB7794FE84155DC02AAC07 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
|
@ -839,7 +839,7 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
|
||||||
// // Already specialized above or we leave sourcecode == "sourcecode"
|
// // Already specialized above or we leave sourcecode == "sourcecode"
|
||||||
// // which is probably the most correct choice. Extensionless headers,
|
// // which is probably the most correct choice. Extensionless headers,
|
||||||
// // for example... Or file types unknown to Xcode that do not map to a
|
// // for example... Or file types unknown to Xcode that do not map to a
|
||||||
// // valid lastKnownFileType value.
|
// // valid explicitFileType value.
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return sourcecode;
|
return sourcecode;
|
||||||
|
@ -882,7 +882,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
|
||||||
|
|
||||||
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
|
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
|
||||||
|
|
||||||
fileRef->AddAttribute("lastKnownFileType",
|
fileRef->AddAttribute("explicitFileType",
|
||||||
this->CreateString(sourcecode.c_str()));
|
this->CreateString(sourcecode.c_str()));
|
||||||
|
|
||||||
// Store the file path relative to the top of the source tree.
|
// Store the file path relative to the top of the source tree.
|
||||||
|
@ -1003,7 +1003,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
|
||||||
*i, cmtarget);
|
*i, cmtarget);
|
||||||
cmXCodeObject* fr = xsf->GetObject("fileRef");
|
cmXCodeObject* fr = xsf->GetObject("fileRef");
|
||||||
cmXCodeObject* filetype =
|
cmXCodeObject* filetype =
|
||||||
fr->GetObject()->GetObject("lastKnownFileType");
|
fr->GetObject()->GetObject("explicitFileType");
|
||||||
|
|
||||||
cmTarget::SourceFileFlags tsFlags =
|
cmTarget::SourceFileFlags tsFlags =
|
||||||
cmtarget.GetTargetSourceFileFlags(*i);
|
cmtarget.GetTargetSourceFileFlags(*i);
|
||||||
|
|
Loading…
Reference in New Issue