File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
ofxProjectGenerator/src/projects Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,15 @@ bool xcodeProject::createProjectFile(){
128128
129129 // make everything relative the right way.
130130 string relRoot = getOFRelPathFS (projectDir).string ();
131-
131+ projectDir = projectDir.lexically_normal ();
132+
133+ // projectDir is always absolute at the moment
134+ // so lets check if the projectDir is inside the OF folder - if it is not make the OF path absolute
135+ if ( projectDir.string ().rfind (getOFRoot (),0 ) != 0 ){
136+ relRoot = getOFRoot ();
137+ }
132138 if (relRoot != " ../../.." ){
133-
134- findandreplaceInTexfile (projectDir / projectName / " .xcodeproj/project.pbxproj" , " ../../.." , relRoot);
139+ findandreplaceInTexfile (projectDir / (projectName + " .xcodeproj/project.pbxproj" ), " ../../.." , relRoot);
135140 findandreplaceInTexfile (projectDir / " Project.xcconfig" , " ../../.." , relRoot);
136141 if ( target == " osx" ){
137142 findandreplaceInTexfile (projectDir / " Makefile" , " ../../.." , relRoot);
You can’t perform that action at this time.
0 commit comments