From 32ebb1e2c72c0612746283ad5969dae93dc57e5a Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 7 Mar 2017 14:13:30 +0100 Subject: [PATCH] Fix of a static library extension of the INtel Thread Building Blocks on OSX/Linux. --- xs/Build.PL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/Build.PL b/xs/Build.PL index 4846cb8bb..b77417ee7 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -8,8 +8,8 @@ use ExtUtils::CppGuess; use Module::Build::WithXSpp; my $cpp_guess = ExtUtils::CppGuess->new; -my $lib_ext = ${$cpp_guess}{config}{lib_ext}; my $mswin = $^O eq 'MSWin32'; +my $lib_ext = $ENV{SLIC3R_STATIC} ? ($mswin ? '.lib' : '.a') : ${$cpp_guess}{config}{lib_ext}; # Library paths to search for boost, thread building blocks and such. # On Windows, there is really no standard. On Unices, this is a bit better. @@ -271,7 +271,7 @@ if ($have_tbb) { } push @INC, (map " -I$_", @tbb_include); # TODO: only use the one related to the chosen lib path if ($ENV{SLIC3R_STATIC} || $cpp_guess->is_msvc) { - push @LIBS, map "${path}/${_}_static.lib", @tbb_libraries; + push @LIBS, map "${path}/${_}_static${suffix}", @tbb_libraries; } else { push @LIBS, " -L$path", (map " -l$_$suffix", @tbb_libraries); }