Index: Source/bindings/scripts/CodeGenerator.pm |
diff --git a/Source/bindings/scripts/CodeGenerator.pm b/Source/bindings/scripts/CodeGenerator.pm |
index 094b08125197c7c94570ffda2154e34257a27c83..7f98ee59a7a77d133070cef31db2a23552338f2d 100644 |
--- a/Source/bindings/scripts/CodeGenerator.pm |
+++ b/Source/bindings/scripts/CodeGenerator.pm |
@@ -264,6 +264,24 @@ sub IDLFileForInterface |
return $idlFiles->{$interfaceName}; |
} |
+sub HFileForInterface |
+{ |
+ my $object = shift; |
+ my $interfaceName = shift; |
+ |
+ my $idlFilename = $object->IDLFileForInterface($interfaceName) |
+ or die("Could NOT find IDL file for interface \"$interfaceName\"!\n"); |
+ |
+ my $sourceRoot = $ENV{SOURCE_ROOT}; |
+ if ($idlFilename =~ /^$sourceRoot/) { |
+ $idlFilename = substr($idlFilename, length($sourceRoot) + 1); |
+ } |
+ $idlFilename = "bindings/" . $idlFilename; |
+ #print "${interfaceName}, ${idlFilename}, ${sourceRoot}\n"; |
+ $idlFilename =~ s/idl$/h/; |
+ return $idlFilename; |
+} |
+ |
sub ParseInterface |
{ |
my $object = shift; |