Skip to content

Commit 999c7ab

Browse files
authored
fix config.make to use relative OF_ROOT if project is inside OF folder (#333)
1 parent 47d443f commit 999c7ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ofxProjectGenerator/src/projects/baseProject.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,13 @@ bool baseProject::save(){
217217

218218
//add the of root path
219219
if( str.rfind("# OF_ROOT =", 0) == 0 ){
220-
saveConfig << "OF_ROOT = " + getOFRoot() << endl;
220+
221+
auto path = getOFRoot();
222+
if( projectDir.string().rfind(getOFRoot(),0) == 0 ){
223+
path = getOFRelPath(projectDir);
224+
}
225+
226+
saveConfig << "OF_ROOT = " << path << endl;
221227
}
222228
// replace this section with our external paths
223229
else if( extSrcPaths.size() && str.rfind("# PROJECT_EXTERNAL_SOURCE_PATHS =", 0) == 0 ){

0 commit comments

Comments
 (0)