winemaker: Improved check for libXML at runtime.

This commit is contained in:
André Hentschel 2013-08-08 00:10:43 +02:00 committed by Alexandre Julliard
parent 1151546ce0
commit 6fb4e06298
1 changed files with 6 additions and 2 deletions

View File

@ -873,8 +873,12 @@ sub source_scan_project_file($$$)
push @{@$project_settings[$T_DEFINES]},$prj_target_defines;
push @{@$project_settings[$T_LDFLAGS]},$prj_target_ldflags;
} elsif ($filename =~ /.vcproj$/i) {
# Import XML::LibXML, you need the libxml package (deb: libxml-libxml-perl, rpm: perl-libxml-perl)
require XML::LibXML;
eval {
require XML::LibXML;
};
if ($@) {
die "Error: You need the libxml package (deb: libxml-libxml-perl, rpm: perl-libxml-perl)";
}
my $xmlparser = XML::LibXML->new();
my $project_xml = $xmlparser->parse_file($filename);