File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
1
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
2
- #define OFPROJECTGENERATOR_MINOR_VERSION "101 "
2
+ #define OFPROJECTGENERATOR_MINOR_VERSION "102 "
3
3
#define OFPROJECTGENERATOR_PATCH_VERSION "0"
4
4
5
5
#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Original file line number Diff line number Diff line change @@ -220,14 +220,25 @@ bool xcodeProject::loadProjectFile() { //base
220
220
addCommand (" Set :objects:E4B69B5B0A3A1756003C02F2:path string " + projectName + " Debug.app" );
221
221
}
222
222
223
- // if ofRoot is not relative to the project path,
224
- // set correct addons and openFrameworks folders
223
+ // Next block updates ofPath in xcode addons and openframeworks folder
224
+ // only if it is not the usual ../../.. path
225
+
226
+ bool updateOFPath = false ;
227
+ fs::path of = getOFRoot ();
225
228
if (!ofIsPathInPath (fs::current_path (), getOFRoot ())) {
226
- addCommand ( " Set :objects: " + folderUUID[ " openFrameworks " ] + " :path string " + getOFRoot (). string () + " /libs/openFrameworks " ) ;
229
+ updateOFPath = true ;
227
230
addCommand (" Set :objects:" + folderUUID[" openFrameworks" ] + " :sourceTree string <absolute>" );
228
-
229
- addCommand (" Set :objects:" + folderUUID[" addons" ] + " :path string " + getOFRoot ().string () + " /addons" );
230
231
addCommand (" Set :objects:" + folderUUID[" addons" ] + " :sourceTree string <absolute>" );
232
+ } else {
233
+ // inside OF Root but not in usual depth
234
+ if (!fs::equivalent (getOFRoot (), " ../../.." )) {
235
+ updateOFPath = true ;
236
+ of = fs::relative (getOFRoot (), fs::current_path ());
237
+ }
238
+ }
239
+ if (updateOFPath) {
240
+ addCommand (" Set :objects:" + folderUUID[" openFrameworks" ] + " :path string " + of.string () + " /libs/openFrameworks" );
241
+ addCommand (" Set :objects:" + folderUUID[" addons" ] + " :path string " + of.string () + " /addons" );
231
242
}
232
243
233
244
return true ;
You can’t perform that action at this time.
0 commit comments