$postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
$postgres->FullExportDLL('postgres.lib');
+ my $snowball = $solution->AddProject('dict_snowball','dll','','src\backend\snowball');
+ $snowball->RelocateFiles('src\backend\snowball\libstemmer', sub {
+ return shift !~ /dict_snowball.c$/;
+ });
+ $snowball->AddIncludeDir('src\include\snowball');
+ $snowball->AddReference($postgres);
+
my $plpgsql = $solution->AddProject('plpgsql','dll','PLs','src\pl\plpgsql\src');
$plpgsql->AddFiles('src\pl\plpgsql\src','scan.l','gram.y');
$plpgsql->AddReference($postgres);
use Carp;
use strict;
use warnings;
+use File::Basename;
sub new
{
confess("Could not find file $filename to remove\n");
}
+sub RelocateFiles
+{
+ my ($self, $targetdir, $proc) = @_;
+ foreach my $f (keys %{$self->{files}}) {
+ my $r = &$proc($f);
+ if ($r) {
+ $self->RemoveFile($f);
+ $self->AddFile($targetdir . '\\' . basename($f));
+ }
+ }
+}
+
sub AddReference
{
my $self = shift;