diff options
author | bubnikv <bubnikv@gmail.com> | 2016-12-14 18:51:27 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-12-14 18:51:27 +0300 |
commit | 56e87e3bdb15ee22b5b435a7263b56583c791c88 (patch) | |
tree | 5b3e65dcbb800845805a884674d1745c64ed9136 /xs/Build.PL | |
parent | a870b6973324a6f4fda6d6f57fa8f2f98590a43f (diff) |
Set BOOST_LOG_DYN_LINK symbol when linking with dynamic boost libraries.
Diffstat (limited to 'xs/Build.PL')
-rw-r--r-- | xs/Build.PL | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xs/Build.PL b/xs/Build.PL index b3e000f5c..e64a9a399 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -119,12 +119,16 @@ if (defined $ENV{BOOST_LIBRARYDIR}) { my $have_boost = 0; my @boost_libraries = qw(system thread log); # we need these -# check without explicit lib path (works on Linux) -if (!$ENV{SLIC3R_STATIC} && ! $mswin) { - $have_boost = 1 - if check_lib( - lib => [ map "boost_${_}", @boost_libraries ], - ); +if (!$ENV{SLIC3R_STATIC}) { + # Dynamic linking of boost libraries. + push @cflags, qw(-BOOST_LOG_DYN_LINK); + if (! $mswin) { + # Check without explicit lib path (works on Linux and OSX). + $have_boost = 1 + if check_lib( + lib => [ map "boost_${_}", @boost_libraries ], + ); + } } if ($have_boost) { |