2014-09-04 19:53:40 +02:00
|
|
|
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
|
2016-04-27 22:38:52 +02:00
|
|
|
index edac48d..3bcc3b9 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- gyp/generator/ninja.py
|
|
|
|
+++ gyp/generator/ninja.py
|
2016-04-27 22:38:52 +02:00
|
|
|
@@ -760,7 +760,16 @@ class NinjaWriter(object):
|
2013-04-09 19:47:14 +02:00
|
|
|
for path in copy['files']:
|
|
|
|
# Normalize the path so trailing slashes don't confuse us.
|
|
|
|
path = os.path.normpath(path)
|
|
|
|
- basename = os.path.split(path)[1]
|
|
|
|
+ (parent_path, basename) = os.path.split(path)
|
|
|
|
+
|
|
|
|
+ # Xcode uses .lproj directories for localized resources. Add a special
|
|
|
|
+ # case to maintain the localization directory component if present.
|
|
|
|
+ if parent_path != '':
|
|
|
|
+ parent_basename = os.path.basename(parent_path)
|
|
|
|
+ (parent_root, parent_ext) = os.path.splitext(parent_basename)
|
|
|
|
+ if parent_ext == '.lproj':
|
|
|
|
+ basename = os.path.join(parent_basename, basename)
|
|
|
|
+
|
|
|
|
src = self.GypPathToNinja(path, env)
|
|
|
|
dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
|
|
|
|
env)
|