mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 20:15:52 +08:00
One more fix for BOOST_DIR
This commit is contained in:
parent
cff79b6555
commit
f24fc2c675
28
xs/Build.PL
28
xs/Build.PL
@ -67,15 +67,13 @@ my @boost_include = ();
|
||||
if (defined $ENV{BOOST_INCLUDEDIR}) {
|
||||
push @boost_include, $ENV{BOOST_INCLUDEDIR}
|
||||
} elsif (defined $ENV{BOOST_DIR}) {
|
||||
my $subdir = $ENV{BOOST_DIR} . (($mswin == 1) ? '\include' : '/include');
|
||||
if (-d $subdir) {
|
||||
push @boost_include, $subdir;
|
||||
} elsif (-d "../$subdir") {
|
||||
# User might have provided a path relative to the Build.PL in the main directory
|
||||
push @boost_include, "../$subdir";
|
||||
} else {
|
||||
push @boost_include, $ENV{BOOST_DIR};
|
||||
# User might have provided a path relative to the Build.PL in the main directory
|
||||
foreach my $subdir ($ENV{BOOST_DIR}, "../$ENV{BOOST_DIR}", "$ENV{BOOST_DIR}/include", "../$ENV{BOOST_DIR}/include") {
|
||||
if (-d $subdir) {
|
||||
push @boost_include, $subdir;
|
||||
}
|
||||
}
|
||||
die "Invalid BOOST_DIR: no such directory\n" if !@boost_include;
|
||||
} else {
|
||||
# Boost library was not defined by the environment.
|
||||
# Try to guess at some default paths.
|
||||
@ -99,15 +97,13 @@ my @boost_libs = ();
|
||||
if (defined $ENV{BOOST_LIBRARYPATH}) {
|
||||
push @boost_libs, $ENV{BOOST_LIBRARYPATH}
|
||||
} elsif (defined $ENV{BOOST_DIR}) {
|
||||
my $subdir = $ENV{BOOST_DIR} . ($mswin ? '\stage\lib' : '/stage/lib');
|
||||
if (-d $subdir) {
|
||||
push @boost_libs, $subdir;
|
||||
} elsif (-d "../$subdir") {
|
||||
# User might have provided a path relative to the Build.PL in the main directory
|
||||
push @boost_libs, "../$subdir";
|
||||
} else {
|
||||
push @boost_libs, $ENV{BOOST_DIR};
|
||||
# User might have provided a path relative to the Build.PL in the main directory
|
||||
foreach my $subdir ("$ENV{BOOST_DIR}/stage/lib", "../$ENV{BOOST_DIR}/stage/lib") {
|
||||
if (-d $subdir) {
|
||||
push @boost_libs, $subdir;
|
||||
}
|
||||
}
|
||||
die "Invalid BOOST_DIR: no such directory\n" if !@boost_libs;
|
||||
} else {
|
||||
# Boost library was not defined by the environment.
|
||||
# Try to guess at some default paths.
|
||||
|
Loading…
x
Reference in New Issue
Block a user