Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
e046e2c6
Commit
e046e2c6
authored
Jan 17, 2014
by
Brad King
💬
Committed by
Kitware Robot
Jan 17, 2014
Browse files
Merge topic 'xcode-storyboard-view'
1ce02ebf
Xcode: Fix storyboard view
d9f1f917
Xcode: Remove dead code
parents
f5909ffc
1ce02ebf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmGlobalXCodeGenerator.cxx
View file @
e046e2c6
...
@@ -753,7 +753,8 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
...
@@ -753,7 +753,8 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
std
::
string
std
::
string
GetSourcecodeValueFromFileExtension
(
const
std
::
string
&
_ext
,
GetSourcecodeValueFromFileExtension
(
const
std
::
string
&
_ext
,
const
std
::
string
&
lang
)
const
std
::
string
&
lang
,
bool
&
keepLastKnownFileType
)
{
{
std
::
string
ext
=
cmSystemTools
::
LowerCase
(
_ext
);
std
::
string
ext
=
cmSystemTools
::
LowerCase
(
_ext
);
std
::
string
sourcecode
=
"sourcecode"
;
std
::
string
sourcecode
=
"sourcecode"
;
...
@@ -764,10 +765,12 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
...
@@ -764,10 +765,12 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
}
}
else
if
(
ext
==
"xib"
)
else
if
(
ext
==
"xib"
)
{
{
keepLastKnownFileType
=
true
;
sourcecode
=
"file.xib"
;
sourcecode
=
"file.xib"
;
}
}
else
if
(
ext
==
"storyboard"
)
else
if
(
ext
==
"storyboard"
)
{
{
keepLastKnownFileType
=
true
;
sourcecode
=
"file.storyboard"
;
sourcecode
=
"file.storyboard"
;
}
}
else
if
(
ext
==
"mm"
)
else
if
(
ext
==
"mm"
)
...
@@ -778,10 +781,6 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
...
@@ -778,10 +781,6 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
{
{
sourcecode
+=
".c.objc"
;
sourcecode
+=
".c.objc"
;
}
}
else
if
(
ext
==
"xib"
)
{
sourcecode
+=
".file.xib"
;
}
else
if
(
ext
==
"plist"
)
else
if
(
ext
==
"plist"
)
{
{
sourcecode
+=
".text.plist"
;
sourcecode
+=
".text.plist"
;
...
@@ -797,6 +796,7 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
...
@@ -797,6 +796,7 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
}
}
else
if
(
ext
==
"png"
||
ext
==
"gif"
||
ext
==
"jpg"
)
else
if
(
ext
==
"png"
||
ext
==
"gif"
||
ext
==
"jpg"
)
{
{
keepLastKnownFileType
=
true
;
sourcecode
=
"image"
;
sourcecode
=
"image"
;
}
}
else
if
(
ext
==
"txt"
)
else
if
(
ext
==
"txt"
)
...
@@ -875,8 +875,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
...
@@ -875,8 +875,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
}
}
else
else
{
{
std
::
string
sourcecode
=
GetSourcecodeValueFromFileExtension
(
ext
,
lang
);
bool
keepLastKnownFileType
=
false
;
const
char
*
attribute
=
(
sourcecode
==
"file.storyboard"
)
?
std
::
string
sourcecode
=
GetSourcecodeValueFromFileExtension
(
ext
,
lang
,
keepLastKnownFileType
);
const
char
*
attribute
=
keepLastKnownFileType
?
"lastKnownFileType"
:
"lastKnownFileType"
:
"explicitFileType"
;
"explicitFileType"
;
fileRef
->
AddAttribute
(
attribute
,
fileRef
->
AddAttribute
(
attribute
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment