mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 17:12:56 +00:00
Updated xs/Build.PL to support Visual Studio compiler suite.
Updated xs/Build.PL to understand BOOST_LIBRARY_PATH and BOOST_INCLUDE_PATH environment variables. This way one may easily switch between various boost builds. Some minor tweeks were done to make Slic3r compile with Visual Studio 2013.
This commit is contained in:
@@ -3,14 +3,22 @@
|
||||
#include <ctime>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <unistd.h> // provides **environ
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h> // provides **_environ
|
||||
#else
|
||||
#include <unistd.h> // provides **environ
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
#undef environ
|
||||
#define environ (*_NSGetEnviron())
|
||||
#else
|
||||
extern char **environ;
|
||||
#ifdef _MSC_VER
|
||||
#define environ _environ
|
||||
#else
|
||||
extern char **environ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -25,14 +25,17 @@ typedef double coordf_t;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// TODO: make sure X = 0
|
||||
enum Axis { X, Y, Z };
|
||||
enum Axis { X=0, Y, Z };
|
||||
|
||||
}
|
||||
using namespace Slic3r;
|
||||
|
||||
/* Implementation of CONFESS("foo"): */
|
||||
#define CONFESS(...) confess_at(__FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||
#ifdef _MSC_VER
|
||||
#define CONFESS(...) confess_at(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
|
||||
#else
|
||||
#define CONFESS(...) confess_at(__FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||
#endif
|
||||
void confess_at(const char *file, int line, const char *func, const char *pat, ...);
|
||||
/* End implementation of CONFESS("foo"): */
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ extern "C" {
|
||||
#include "ppport.h"
|
||||
#undef do_open
|
||||
#undef do_close
|
||||
#ifdef _MSC_VER
|
||||
// Undef some of the macros set by Perl <xsinit.h>, which cause compilation errors on Win32
|
||||
#undef send
|
||||
#undef connect
|
||||
#undef bind
|
||||
#endif /* _MSC_VER */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user