File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 11#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
2- #define OFPROJECTGENERATOR_MINOR_VERSION "101 "
2+ #define OFPROJECTGENERATOR_MINOR_VERSION "102 "
33#define OFPROJECTGENERATOR_PATCH_VERSION "0"
44
55#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Original file line number Diff line number Diff line change @@ -222,12 +222,25 @@ bool xcodeProject::loadProjectFile() { //base
222222
223223 // if ofRoot is not relative to the project path,
224224 // set correct addons and openFrameworks folders
225+
226+ bool updateOFPath = false ;
227+
228+ fs::path of = getOFRoot ();
225229 if (!ofIsPathInPath (fs::current_path (), getOFRoot ())) {
226- addCommand ( " Set :objects: " + folderUUID[ " openFrameworks " ] + " :path string " + getOFRoot (). string () + " /libs/openFrameworks " ) ;
230+ updateOFPath = true ;
227231 addCommand (" Set :objects:" + folderUUID[" openFrameworks" ] + " :sourceTree string <absolute>" );
228-
229- addCommand (" Set :objects:" + folderUUID[" addons" ] + " :path string " + getOFRoot ().string () + " /addons" );
230232 addCommand (" Set :objects:" + folderUUID[" addons" ] + " :sourceTree string <absolute>" );
233+ } else {
234+ // inside OF Root but not in usual depth
235+ if (!fs::equivalent (getOFRoot (), " ../../.." )) {
236+ updateOFPath = true ;
237+ of = fs::relative (getOFRoot (), fs::current_path ());
238+ }
239+ }
240+
241+ if (updateOFPath) {
242+ addCommand (" Set :objects:" + folderUUID[" openFrameworks" ] + " :path string " + of.string () + " /libs/openFrameworks" );
243+ addCommand (" Set :objects:" + folderUUID[" addons" ] + " :path string " + of.string () + " /addons" );
231244 }
232245
233246 return true ;
You can’t perform that action at this time.
0 commit comments