Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
#define OFPROJECTGENERATOR_MINOR_VERSION "101"
#define OFPROJECTGENERATOR_MINOR_VERSION "102"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Expand Down
21 changes: 16 additions & 5 deletions commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,25 @@ bool xcodeProject::loadProjectFile() { //base
addCommand("Set :objects:E4B69B5B0A3A1756003C02F2:path string " + projectName + "Debug.app");
}

// if ofRoot is not relative to the project path,
// set correct addons and openFrameworks folders
// Next block updates ofPath in xcode addons and openframeworks folder
// only if it is not the usual ../../.. path

bool updateOFPath = false;
fs::path of = getOFRoot();
if (!ofIsPathInPath(fs::current_path(), getOFRoot())) {
addCommand("Set :objects:" + folderUUID["openFrameworks"] + ":path string " + getOFRoot().string() + "/libs/openFrameworks");
updateOFPath = true;
addCommand("Set :objects:" + folderUUID["openFrameworks"] + ":sourceTree string <absolute>");

addCommand("Set :objects:" + folderUUID["addons"] + ":path string " + getOFRoot().string() + "/addons");
addCommand("Set :objects:" + folderUUID["addons"] + ":sourceTree string <absolute>");
} else {
// inside OF Root but not in usual depth
if (!fs::equivalent(getOFRoot(), "../../..")) {
updateOFPath = true;
of = fs::relative(getOFRoot(), fs::current_path());
}
}
if (updateOFPath) {
addCommand("Set :objects:" + folderUUID["openFrameworks"] + ":path string " + of.string() + "/libs/openFrameworks");
addCommand("Set :objects:" + folderUUID["addons"] + ":path string " + of.string() + "/addons");
}

return true;
Expand Down