Skip to content

Commit

Permalink
Allow MSVC to build with Tcl 8.6.
Browse files Browse the repository at this point in the history
Commit eaba54c added support for Tcl 8.6 for configure-supported
platforms after verifying that pltcl works without further changes, but
the MSVC tooling wasn't updated accordingly.  Update MSVC to match,
restructuring the code to avoid duplicating the logic for every Tcl
version supported.

Backpatch to all live branches, like eaba54c.  In 9.4 and previous,
change the patch to use backslashes rather than forward, as in the rest
of the file.

Reported by Paresh More, who also tested the patch I provided.
Discussion: https://postgr.es/m/CAAgiCNGVw3ssBtSi3ZNstrz5k00ax=UV+_ZEHUeW_LMSGL2sew@mail.gmail.com
  • Loading branch information
alvherre committed May 5, 2017
1 parent 086221c commit 14722c6
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/tools/msvc/Mkvcbuild.pm
Expand Up @@ -204,20 +204,24 @@ sub mkvcbuild

if ($solution->{options}->{tcl})
{
my $found = 0;
my $pltcl =
$solution->AddProject('pltcl', 'dll', 'PLs', 'src/pl/tcl');
$pltcl->AddIncludeDir($solution->{options}->{tcl} . '/include');
$pltcl->AddReference($postgres);
if (-e $solution->{options}->{tcl} . '/lib/tcl85.lib')
{
$pltcl->AddLibrary(
$solution->{options}->{tcl} . '/lib/tcl85.lib');
}
else

for my $tclver (qw(86t 85 84))
{
$pltcl->AddLibrary(
$solution->{options}->{tcl} . '/lib/tcl84.lib');
my $tcllib = $solution->{options}->{tcl} . "/lib/tcl$tclver.lib";
if (-e $tcllib)
{
$pltcl->AddLibrary($tcllib);
$found = 1;
last;
}
}
die "Unable to find $solution->{options}->{tcl}/lib/tcl<version>.lib"
unless $found;
}

$libpq = $solution->AddProject('libpq', 'dll', 'interfaces',
Expand Down

0 comments on commit 14722c6

Please sign in to comment.