From b7d3ed26c60219b6bf219d730f1e75ab5b92532e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 23 Mar 2017 15:06:22 +0100 Subject: [PATCH] Link boost & intel Thread Building Blocks statically by default on Windows and OSX, dynamically on Linux. This could be overidden by an environment variable SLIC3R_DYNAMIC=1 --- xs/Build.PL | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xs/Build.PL b/xs/Build.PL index 909c37bb7..61ebbd087 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -7,6 +7,9 @@ use Devel::CheckLib; use ExtUtils::CppGuess; use Module::Build::WithXSpp; +# Link boost & TBB statically by default on Windows & OSX. +$ENV{SLIC3R_STATIC} = 1 if ($^O eq 'MSWin32' || $^O eq 'darwin') && (! defined($ENV{SLIC3R_DYNAMIC}) || $ENV{SLIC3R_DYNAMIC} != 1); + my $cpp_guess = ExtUtils::CppGuess->new; my $mswin = $^O eq 'MSWin32'; my $lib_ext = $ENV{SLIC3R_STATIC} ? ($cpp_guess->is_msvc ? '.lib' : '.a') : ${$cpp_guess}{config}{lib_ext}; @@ -43,7 +46,7 @@ my @early_includes = (); my @INC = qw(-Isrc/libslic3r -Isrc/glew/include); my @LIBS = $cpp_guess->is_msvc ? qw(-LIBPATH:src/libslic3r) : qw(-Lsrc/libslic3r); -$ENV{SLIC3R_GUI} = 1 if $ENV{SLIC3R_NOGUI} != 1; +$ENV{SLIC3R_GUI} = 1 if ! defined($ENV{SLIC3R_NOGUI}) || $ENV{SLIC3R_NOGUI} != 1; if ($ENV{SLIC3R_GUI} || $ENV{SLIC3R_PRUS}) {