summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/sf/antcontrib
diff options
context:
space:
mode:
authorcarnold <[email protected]>2008-01-30 05:19:46 +0000
committercarnold <[email protected]>2008-01-30 05:19:46 +0000
commit105ab312debc0bf5939a48d2a8a887cb8ff7b017 (patch)
treed87511e350eb97111a2106a9516c70797b4a8ee0 /src/main/java/net/sf/antcontrib
parent62752574bace0402a20f94e2e6297333b673eac0 (diff)
Add projectRoot that XCode 3 keeps asking for
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/cpptasks/trunk@147 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src/main/java/net/sf/antcontrib')
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java b/src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java
index bbd96f3..1d77c29 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java
@@ -169,8 +169,13 @@ public final class XcodeProjectWriter
//
// add project to property list
//
+ //
+ // Calculate path (typically several ../..) of the root directory
+ // (where build.xml lives) relative to the XCode project directory.
+ // XCode 3.0 will now prompt user to supply the value if not specified.
+ String projectRoot = CUtil.getRelativePath(basePath, projectDef.getProject().getBaseDir());
PBXObjectRef project = createPBXProject(compilerConfigurations, mainGroup,
- projectDirPath, projectTargets);
+ projectDirPath, projectRoot, projectTargets);
objects.put(project.getID(), project.getProperties());
@@ -564,11 +569,13 @@ public final class XcodeProjectWriter
* @param mainGroup main group.
* @param projectDirPath project directory path.
* @param targets targets.
+ * @param projectRoot projectRoot directory relative to
* @return project.
*/
private static PBXObjectRef createPBXProject(final PBXObjectRef buildConfigurationList,
final PBXObjectRef mainGroup,
final String projectDirPath,
+ final String projectRoot,
final List targets) {
Map map = new HashMap();
map.put("isa", "PBXProject");
@@ -577,6 +584,7 @@ public final class XcodeProjectWriter
map.put("mainGroup", mainGroup.getID());
map.put("projectDirPath", projectDirPath);
map.put("targets", targets);
+ map.put("projectRoot", projectRoot);
return new PBXObjectRef(map);
}