Build.PL 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/perl -w
  2. use strict;
  3. use warnings;
  4. use Module::Build::WithXSpp;
  5. my $build = Module::Build::WithXSpp->new(
  6. module_name => 'Slic3r::XS',
  7. dist_abstract => 'XS code for Slic3r',
  8. build_requires => {qw(
  9. ExtUtils::ParseXS 3.18
  10. ExtUtils::Typemap 1.00
  11. ExtUtils::Typemaps::Default 1.03
  12. ExtUtils::XSpp 0.17
  13. Module::Build 0.3601
  14. Test::More 0
  15. )},
  16. configure_requires => {qw(
  17. ExtUtils::CppGuess 0.07
  18. Module::Build 0.38
  19. Module::Build::WithXSpp 0.13
  20. )},
  21. # _GLIBCXX_USE_C99 : to get the long long type for g++
  22. # HAS_BOOL : stops Perl/lib/CORE/handy.h from doing "# define bool char" for MSVC
  23. # NOGDI : prevents inclusion of wingdi.h which defines functions Polygon() and Polyline() in global namespace
  24. extra_compiler_flags => [qw(-D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DSLIC3RXS), ($ENV{SLIC3R_DEBUG} ? ' -DSLIC3R_DEBUG -g' : '')],
  25. # Provides extra C typemaps that are auto-merged
  26. extra_typemap_modules => {
  27. 'ExtUtils::Typemaps::Default' => '1.03',
  28. },
  29. # for MSVC builds
  30. early_includes => [qw(
  31. cstring
  32. cstdlib
  33. ostream
  34. )]
  35. );
  36. $build->create_build_script;
  37. __END__