2013-06-22 15:16:45 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Module::Build::WithXSpp;
|
|
|
|
|
|
|
|
my $build = Module::Build::WithXSpp->new(
|
|
|
|
module_name => 'Slic3r::XS',
|
|
|
|
dist_abstract => 'XS code for Slic3r',
|
|
|
|
build_requires => {qw(
|
2013-06-23 18:05:20 +00:00
|
|
|
ExtUtils::ParseXS 3.18
|
|
|
|
ExtUtils::Typemap 1.00
|
|
|
|
ExtUtils::Typemaps::Default 1.03
|
|
|
|
ExtUtils::XSpp 0.17
|
2013-06-22 15:16:45 +00:00
|
|
|
Module::Build 0.3601
|
|
|
|
Test::More 0
|
|
|
|
)},
|
|
|
|
configure_requires => {qw(
|
|
|
|
ExtUtils::CppGuess 0.07
|
|
|
|
Module::Build 0.38
|
2013-06-23 18:05:20 +00:00
|
|
|
Module::Build::WithXSpp 0.13
|
2013-06-22 15:16:45 +00:00
|
|
|
)},
|
2013-08-26 13:57:54 +00:00
|
|
|
# _GLIBCXX_USE_C99 : to get the long long type for g++
|
2013-06-22 15:16:45 +00:00
|
|
|
# HAS_BOOL : stops Perl/lib/CORE/handy.h from doing "# define bool char" for MSVC
|
2013-08-26 18:56:36 +00:00
|
|
|
# NOGDI : prevents inclusion of wingdi.h which defines functions Polygon() and Polyline() in global namespace
|
2014-04-24 11:43:24 +00:00
|
|
|
extra_compiler_flags => [qw(-D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DSLIC3RXS), ($ENV{SLIC3R_DEBUG} ? ' -DSLIC3R_DEBUG -g -ftemplate-backtrace-limit=0' : '')],
|
2013-06-22 15:16:45 +00:00
|
|
|
|
|
|
|
# Provides extra C typemaps that are auto-merged
|
|
|
|
extra_typemap_modules => {
|
2013-06-23 18:05:20 +00:00
|
|
|
'ExtUtils::Typemaps::Default' => '1.03',
|
2013-06-22 15:16:45 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
# for MSVC builds
|
|
|
|
early_includes => [qw(
|
|
|
|
cstring
|
|
|
|
cstdlib
|
|
|
|
ostream
|
2014-02-01 10:53:45 +00:00
|
|
|
sstream
|
2013-06-22 15:16:45 +00:00
|
|
|
)]
|
|
|
|
);
|
|
|
|
|
|
|
|
$build->create_build_script;
|
|
|
|
|
|
|
|
__END__
|