aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-09-11 12:46:55 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-09-11 12:46:55 -0400
commit28e5e5648cc3666537c393b2636c4aa34fdb22c1 (patch)
tree76a19613de9e07793cca9d01d41e47b3057a43ef /src
parent24598337c8d214ba8dcf354130b72c49636bba69 (diff)
downloadpostgresql-28e5e5648cc3666537c393b2636c4aa34fdb22c1.tar.gz
postgresql-28e5e5648cc3666537c393b2636c4aa34fdb22c1.zip
Fix and simplify MSVC build's handling of xml/xslt/uuid dependencies.
Solution.pm mistakenly believed that the xml option requires the xslt option, when actually the dependency is the other way around; and it believed that libxml requires libiconv, which is not necessarily so, so we shouldn't enforce it here. Fix the option cross-checking logic. Also, since AddProject already takes care of adding libxml and libxslt include and library dependencies to every project, there's no need for the custom code that did that in mkvcbuild. While at it, let's handle the similar dependencies for uuid in a similar fashion. Given the lack of field complaints about these overly strict build dependency requirements, there seems no need for a back-patch. Michael Paquier Discussion: <CAB7nPqR0+gpu3mRQvFjf-V-bMxmiSJ6NpTg9_WzVDL+a31cV2g@mail.gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/Mkvcbuild.pm22
-rw-r--r--src/tools/msvc/Solution.pm12
2 files changed, 9 insertions, 25 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index b3ed1f56e21..93dfd24a83b 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -381,18 +381,7 @@ sub mkvcbuild
$zic->AddDirResourceFile('src/timezone');
$zic->AddReference($libpgcommon, $libpgport);
- if ($solution->{options}->{xml})
- {
- $contrib_extraincludes->{'pgxml'} = [
- $solution->{options}->{xml} . '/include',
- $solution->{options}->{xslt} . '/include',
- $solution->{options}->{iconv} . '/include' ];
-
- $contrib_extralibs->{'pgxml'} = [
- $solution->{options}->{xml} . '/lib/libxml2.lib',
- $solution->{options}->{xslt} . '/lib/libxslt.lib' ];
- }
- else
+ if (!$solution->{options}->{xml})
{
push @contrib_excludes, 'xml2';
}
@@ -402,14 +391,7 @@ sub mkvcbuild
push @contrib_excludes, 'sslinfo';
}
- if ($solution->{options}->{uuid})
- {
- $contrib_extraincludes->{'uuid-ossp'} =
- [ $solution->{options}->{uuid} . '/include' ];
- $contrib_extralibs->{'uuid-ossp'} =
- [ $solution->{options}->{uuid} . '/lib/uuid.lib' ];
- }
- else
+ if (!$solution->{options}->{uuid})
{
push @contrib_excludes, 'uuid-ossp';
}
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 9cb1ad36cf3..8217d06f28e 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -37,12 +37,9 @@ sub _new
unless exists $options->{float8byval};
die "float8byval not permitted on 32 bit platforms"
if $options->{float8byval} && $bits == 32;
- if ($options->{xml})
+ if ($options->{xslt} && !$options->{xml})
{
- if (!($options->{xslt} && $options->{iconv}))
- {
- die "XML requires both XSLT and ICONV\n";
- }
+ die "XSLT requires XML\n";
}
$options->{blocksize} = 8
unless $options->{blocksize}; # undef or 0 means default
@@ -555,6 +552,11 @@ sub AddProject
$proj->AddIncludeDir($self->{options}->{xslt} . '\include');
$proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib');
}
+ if ($self->{options}->{uuid})
+ {
+ $proj->AddIncludeDir($self->{options}->{uuid} . '\include');
+ $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib');
+ }
return $proj;
}