littlorryatchina / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

absolute source paths not working in xcode generate #231

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. specify a 'source' with an absolute path (e.g. /Developer/SomeFile.cpp'

The generated xcode project will instead include a reference to 
Developer/SomeFile.cpp

Seems the breakdown happens because of the line in xcodeproj_file.py:
path_split = path.split(posixpath.sep)

Doing this on an absolute path as above will leave path_split[0] as '', instead 
of respecting the '/'.

Original issue reported on code.google.com by mcradd...@gmail.com on 25 Oct 2011 at 9:57

GoogleCodeExporter commented 9 years ago
i modified my file to append a '/' for absolute paths:

path_split = path.split(posixpath.sep)
    if path[0] == posixpath.sep:
        if path_split[0] == '': 
            path_split[0] = '/'

Original comment by s...@capsher.com on 20 Aug 2012 at 9:54