mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Fix compilation on Windows
This commit is contained in:
parent
9f9b5afedb
commit
97bf69ba7f
3 changed files with 16 additions and 10 deletions
16
xs/Build.PL
16
xs/Build.PL
|
@ -25,15 +25,15 @@ if (defined $ENV{BOOST_DIR}) {
|
||||||
} else {
|
} else {
|
||||||
push @INC, map "-I$_", grep { -d $_ }
|
push @INC, map "-I$_", grep { -d $_ }
|
||||||
qw(/opt/local/include /usr/local/include /opt/include),
|
qw(/opt/local/include /usr/local/include /opt/include),
|
||||||
qw(/usr/include C:/Boost/include);
|
qw(/usr/include C:\Boost\include);
|
||||||
push @LIBS, map "-L$_", grep { -d $_ }
|
push @LIBS, map "-L$_", grep { -d $_ }
|
||||||
qw(/opt/local/lib /usr/local/lib /opt/lib /usr/lib),
|
qw(/opt/local/lib /usr/local/lib /opt/lib /usr/lib),
|
||||||
qw(C:/Boost/lib /lib);
|
qw(C:\Boost\lib /lib);
|
||||||
|
|
||||||
if ($^O eq 'MSWin32') {
|
if ($^O eq 'MSWin32') {
|
||||||
for my $path (glob 'C:/dev/boost* C:/boost*') {
|
for my $path (glob 'C:\dev\boost* C:\boost*') {
|
||||||
push @INC "-I" . $path;
|
push @INC, "-I" . $path;
|
||||||
push @INC "-L" . $path . "/stage/lib";
|
push @INC, "-L" . $path . "/stage/lib";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,8 @@ if (defined $ENV{BOOST_DIR}) {
|
||||||
push @INC, '-Iinclude';
|
push @INC, '-Iinclude';
|
||||||
|
|
||||||
my @boost_libs = qw(thread system);
|
my @boost_libs = qw(thread system);
|
||||||
for my $pattern ('boost_%s', 'boost_%s-mt') {
|
my $have_boost = 0;
|
||||||
|
for my $pattern ('boost_%s', 'boost_%s-mt', 'boost_%s-mgw47-mt-1_59') {
|
||||||
check_lib(
|
check_lib(
|
||||||
lib => sprintf($pattern, 'system'),
|
lib => sprintf($pattern, 'system'),
|
||||||
INC => join(' ', @INC),
|
INC => join(' ', @INC),
|
||||||
|
@ -49,8 +50,10 @@ for my $pattern ('boost_%s', 'boost_%s-mt') {
|
||||||
) or next;
|
) or next;
|
||||||
push @LIBS, map sprintf("-l$pattern", $_), @boost_libs;
|
push @LIBS, map sprintf("-l$pattern", $_), @boost_libs;
|
||||||
push @cflags, '-DBOOST_LIBS';
|
push @cflags, '-DBOOST_LIBS';
|
||||||
|
$have_boost = 1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
die "No Boost!\n" if !$have_boost;
|
||||||
if ($ENV{SLIC3R_DEBUG}) {
|
if ($ENV{SLIC3R_DEBUG}) {
|
||||||
# only on newer GCCs: -ftemplate-backtrace-limit=0
|
# only on newer GCCs: -ftemplate-backtrace-limit=0
|
||||||
push @cflags, qw(-DSLIC3R_DEBUG -g);
|
push @cflags, qw(-DSLIC3R_DEBUG -g);
|
||||||
|
@ -95,6 +98,7 @@ my $build = Module::Build::WithXSpp->new(
|
||||||
cstdlib
|
cstdlib
|
||||||
ostream
|
ostream
|
||||||
sstream
|
sstream
|
||||||
|
libslic3r/GCodeSender.hpp
|
||||||
)]
|
)]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -420,9 +420,11 @@ GCodeSender::do_send(const std::string &line)
|
||||||
this->can_send = false;
|
this->can_send = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SLIC3RXS
|
#ifdef SLIC3RXS
|
||||||
REGISTER_CLASS(GCodeSender, "GCode::Sender");
|
#include <myinit.h>
|
||||||
|
__REGISTER_CLASS(Slic3r::GCodeSender, "GCode::Sender");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define slic3r_GCodeSender_hpp_
|
#define slic3r_GCodeSender_hpp_
|
||||||
#ifdef BOOST_LIBS
|
#ifdef BOOST_LIBS
|
||||||
|
|
||||||
#include <myinit.h>
|
#include <libslic3r/libslic3r.h>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue