mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-17 17:21:08 -05:00
Add more extensions to Resources source group by default
Extend the Resources group regex to match pdf, png, jpeg, jpg, storyboards, and xcassets. This cleans up more complex Xcode projects a lot. While at it, factor the regular expressions for both "Resources" and "Source Files" into macros.
This commit is contained in:
@@ -87,12 +87,10 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
|||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
this->AddSourceGroup("", "^.*$");
|
this->AddSourceGroup("", "^.*$");
|
||||||
this->AddSourceGroup("Source Files",
|
this->AddSourceGroup("Source Files", CM_SOURCE_REGEX);
|
||||||
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp"
|
|
||||||
"|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
|
|
||||||
this->AddSourceGroup("Header Files", CM_HEADER_REGEX);
|
this->AddSourceGroup("Header Files", CM_HEADER_REGEX);
|
||||||
this->AddSourceGroup("CMake Rules", "\\.rule$");
|
this->AddSourceGroup("CMake Rules", "\\.rule$");
|
||||||
this->AddSourceGroup("Resources", "\\.plist$");
|
this->AddSourceGroup("Resources", CM_RESOURCE_REGEX);
|
||||||
this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$");
|
this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$");
|
||||||
|
|
||||||
this->ObjectLibrariesSourceGroupIndex = this->SourceGroups.size();
|
this->ObjectLibrariesSourceGroupIndex = this->SourceGroups.size();
|
||||||
|
|||||||
@@ -120,4 +120,10 @@ private:
|
|||||||
// TODO: Factor out into platform information modules.
|
// TODO: Factor out into platform information modules.
|
||||||
#define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"
|
#define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"
|
||||||
|
|
||||||
|
#define CM_SOURCE_REGEX \
|
||||||
|
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj" \
|
||||||
|
"|bat)$"
|
||||||
|
|
||||||
|
#define CM_RESOURCE_REGEX "\\.(pdf|plist|png|jpeg|jpg|storyboard|xcassets)$"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user