From e63576ce1aa85b7149f37a1f896a84f17ae58a7d Mon Sep 17 00:00:00 2001 From: meta Date: Mon, 17 Jan 2011 22:34:46 +0100 Subject: replace stat() with QFileInfo diff --git a/src/mainwin.cc b/src/mainwin.cc index ef738fc..7645860 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -75,10 +75,6 @@ //for chdir #include -// for stat() -#include -#include - #ifdef ENABLE_CGAL #if 1 @@ -992,10 +988,8 @@ void MainWindow::pasteViewportRotation() void MainWindow::checkAutoReload() { QString new_stinfo; - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(this->fileName.toAscii().data(), &st); - new_stinfo.sprintf("%x.%x", (int)st.st_mtime, (int)st.st_size); + QFileInfo finfo(this->fileName); + new_stinfo = QString::number(finfo.size()) + QString::number(finfo.lastModified().toTime_t()); if (new_stinfo != autoReloadInfo) actionReloadCompile(); autoReloadInfo = new_stinfo; -- cgit v0.10.1 From 1b44be5a635859ca7dd8bbfd8b19b4e9403faa6c Mon Sep 17 00:00:00 2001 From: meta Date: Mon, 17 Jan 2011 22:38:18 +0100 Subject: rename to fix a name clash with inner scope diff --git a/src/mainwin.cc b/src/mainwin.cc index 7645860..3373122 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -1467,7 +1467,7 @@ static void renderGLviaCGAL(void *vp) glColor3f(col2.redF(), col2.greenF(), col2.blueF()); // Extract the boundary, including inner boundaries of the polygons - for (fci_t fit = E.faces_begin(), fend = E.faces_end(); fit != fend; ++fit) + for (fci_t fit = E.faces_begin(), facesend = E.faces_end(); fit != facesend; ++fit) { bool fset = false; double fx = 0.0, fy = 0.0; -- cgit v0.10.1 From 163461f47cdfb9de4b6b79268537fbe432a2522d Mon Sep 17 00:00:00 2001 From: meta Date: Mon, 17 Jan 2011 23:50:33 +0100 Subject: rename to fix a name clash with inner scope diff --git a/src/nef2dxf.cc b/src/nef2dxf.cc index 44d7561..6191e5e 100644 --- a/src/nef2dxf.cc +++ b/src/nef2dxf.cc @@ -38,7 +38,7 @@ DxfData::DxfData(const struct CGAL_Nef_polyhedron &N) typedef Explorer::Halfedge_around_face_const_circulator heafcc_t; Explorer E = N.p2.explorer(); - for (fci_t fit = E.faces_begin(), fend = E.faces_end(); fit != fend; ++fit) + for (fci_t fit = E.faces_begin(), facesend = E.faces_end(); fit != facesend; ++fit) { heafcc_t fcirc(E.halfedge(fit)), fend(fcirc); int first_point = -1, last_point = -1; -- cgit v0.10.1 From 8160212499c40c74f1c1c396f02332336ec4e8ae Mon Sep 17 00:00:00 2001 From: meta Date: Tue, 18 Jan 2011 00:02:56 +0100 Subject: add C99 math for win32 diff --git a/src/dxfdata.cc b/src/dxfdata.cc index dc3e8a1..0579389 100644 --- a/src/dxfdata.cc +++ b/src/dxfdata.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include "mathc99.h" #include struct Line { diff --git a/src/dxfdim.cc b/src/dxfdim.cc index 02a1274..a45768d 100644 --- a/src/dxfdim.cc +++ b/src/dxfdim.cc @@ -31,7 +31,7 @@ #include "printutils.h" #include "context.h" -#include +#include "mathc99.h" #include #include #include diff --git a/src/dxftess-glu.cc b/src/dxftess-glu.cc index ca12ea9..63fa2e5 100644 --- a/src/dxftess-glu.cc +++ b/src/dxftess-glu.cc @@ -9,7 +9,7 @@ # include #endif #include -#include +#include "mathc99.h" #ifdef WIN32 # define STDCALL __stdcall diff --git a/src/func.cc b/src/func.cc index e8ff54a..46b29a8 100644 --- a/src/func.cc +++ b/src/func.cc @@ -28,7 +28,7 @@ #include "context.h" #include "dxfdim.h" #include "builtin.h" -#include +#include "mathc99.h" AbstractFunction::~AbstractFunction() { diff --git a/src/glview.cc b/src/glview.cc index d51714b..0b161c8 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -31,7 +31,7 @@ #include #include #include -#include +#include "mathc99.h" #include #define FAR_FAR_AWAY 100000.0 diff --git a/src/grid.h b/src/grid.h index 572bc66..306751f 100644 --- a/src/grid.h +++ b/src/grid.h @@ -1,7 +1,7 @@ #ifndef GRID_H_ #define GRID_H_ -#include +#include "mathc99.h" #include #include #include diff --git a/src/mathc99.cc b/src/mathc99.cc new file mode 100644 index 0000000..db71059 --- /dev/null +++ b/src/mathc99.cc @@ -0,0 +1,5 @@ +#include "mathc99.h" + +double found(double a) { + return a > 0 ? floor(a+0.5) : ceil(a-0.5); +} diff --git a/src/mathc99.h b/src/mathc99.h new file mode 100644 index 0000000..4d5d3be --- /dev/null +++ b/src/mathc99.h @@ -0,0 +1,16 @@ +#ifndef MATHC99_H_ +#define MATHC99_H_ + +#ifdef WIN32 + +#include +//for native win32 builds we need to provide C99 math functions by ourselves +double round(double a); + +#else + +#include + +#endif + +#endif diff --git a/src/value.cc b/src/value.cc index a237c5a..3931755 100644 --- a/src/value.cc +++ b/src/value.cc @@ -24,7 +24,7 @@ */ #include "value.h" -#include +#include "mathc99.h" Value::Value() { -- cgit v0.10.1 From e01934a24da408ac28076cc151e00c17ad6172ee Mon Sep 17 00:00:00 2001 From: meta Date: Tue, 18 Jan 2011 00:20:12 +0100 Subject: use QFileInfo instead of stat() diff --git a/src/dxfdim.cc b/src/dxfdim.cc index a45768d..5311209 100644 --- a/src/dxfdim.cc +++ b/src/dxfdim.cc @@ -32,10 +32,9 @@ #include "context.h" #include "mathc99.h" -#include -#include -#include #include +#include +#include QHash dxf_dim_cache; QHash dxf_cross_cache; @@ -62,12 +61,10 @@ Value builtin_dxf_dim(const Context *ctx, const QVector &argnames, cons name = args[i].text; } - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(filename.toAscii().data(), &st); + QFileInfo fileInfo(filename); QString key = filename + "|" + layername + "|" + name + "|" + QString::number(xorigin) + "|" + QString::number(yorigin) + - "|" + QString::number(scale) + "|" + QString::number(st.st_mtime) + "|" + QString::number(st.st_size); + "|" + QString::number(scale) + "|" + QString::number(fileInfo.lastModified().toTime_t()) + "|" + QString::number(fileInfo.size()); if (dxf_dim_cache.contains(key)) return dxf_dim_cache[key]; @@ -144,12 +141,10 @@ Value builtin_dxf_cross(const Context *ctx, const QVector &argnames, co args[i].getnum(scale); } - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(filename.toAscii().data(), &st); + QFileInfo fileInfo(filename); QString key = filename + "|" + layername + "|" + QString::number(xorigin) + "|" + QString::number(yorigin) + - "|" + QString::number(scale) + "|" + QString::number(st.st_mtime) + "|" + QString::number(st.st_size); + "|" + QString::number(scale) + "|" + QString::number(fileInfo.lastModified().toTime_t()) + "|" + QString::number(fileInfo.size()); if (dxf_cross_cache.contains(key)) return dxf_cross_cache[key]; diff --git a/src/dxflinextrude.cc b/src/dxflinextrude.cc index 83c3d9c..df364e5 100644 --- a/src/dxflinextrude.cc +++ b/src/dxflinextrude.cc @@ -34,13 +34,11 @@ #include "progress.h" #include "openscad.h" // get_fragments_from_r() -#include -#include -#include - #include #include #include +#include +#include class DxfLinearExtrudeModule : public AbstractModule { @@ -320,14 +318,12 @@ QString DxfLinearExtrudeNode::dump(QString indent) const { if (dump_cache.isEmpty()) { QString text; - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(filename.toAscii().data(), &st); + QFileInfo fileInfo(filename); text.sprintf("linear_extrude(file = \"%s\", cache = \"%x.%x\", layer = \"%s\", " "height = %g, origin = [ %g %g ], scale = %g, center = %s, convexity = %d", - filename.toAscii().data(), (int)st.st_mtime, (int)st.st_size, - layername.toAscii().data(), height, origin_x, origin_y, scale, - center ? "true" : "false", convexity); + filename.toAscii().data(), (int)fileInfo.lastModified().toTime_t(), + (int)fileInfo.size(), layername.toAscii().data(), height, origin_x, + origin_y, scale, center ? "true" : "false", convexity); if (has_twist) { QString t2; t2.sprintf(", twist = %g, slices = %d", twist, slices); diff --git a/src/dxfrotextrude.cc b/src/dxfrotextrude.cc index ea603f0..6344d2a 100644 --- a/src/dxfrotextrude.cc +++ b/src/dxfrotextrude.cc @@ -33,13 +33,11 @@ #include "progress.h" #include "openscad.h" // get_fragments_from_r() -#include -#include -#include - #include #include #include +#include +#include class DxfRotateExtrudeModule : public AbstractModule { @@ -217,15 +215,13 @@ QString DxfRotateExtrudeNode::dump(QString indent) const { if (dump_cache.isEmpty()) { QString text; - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(filename.toAscii().data(), &st); + QFileInfo fileInfo(filename); text.sprintf("rotate_extrude(file = \"%s\", cache = \"%x.%x\", layer = \"%s\", " "origin = [ %g %g ], scale = %g, convexity = %d, " "$fn = %g, $fa = %g, $fs = %g) {\n", - filename.toAscii().data(), (int)st.st_mtime, (int)st.st_size, - layername.toAscii().data(), origin_x, origin_y, scale, convexity, - fn, fa, fs); + filename.toAscii().data(), (int)fileInfo.lastModified().toTime_t(), + (int)fileInfo.size(),layername.toAscii().data(), origin_x, origin_y, + scale, convexity, fn, fa, fs); foreach (AbstractNode *v, children) text += v->dump(indent + QString("\t")); text += indent + "}\n"; -- cgit v0.10.1 From 5c9ca91c2ce39f23246c95d23a982ac0f5721e28 Mon Sep 17 00:00:00 2001 From: meta Date: Tue, 18 Jan 2011 00:36:05 +0100 Subject: fix truncation warning diff --git a/src/polyset.cc b/src/polyset.cc index d438769..022e6cc 100644 --- a/src/polyset.cc +++ b/src/polyset.cc @@ -149,7 +149,7 @@ void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, double *m #ifdef ENABLE_OPENCSG if (shaderinfo) { glUniform4f(shaderinfo[1], col.redF(), col.greenF(), col.blueF(), 1.0f); - glUniform4f(shaderinfo[2], 255 / 255.0, 236 / 255.0, 94 / 255.0, 1.0); + glUniform4f(shaderinfo[2], 255 / 255.0f, 236 / 255.0f, 94 / 255.0f, 1.0f); } #endif /* ENABLE_OPENCSG */ } @@ -158,8 +158,8 @@ void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, double *m glColor3f(col.redF(), col.greenF(), col.blueF()); #ifdef ENABLE_OPENCSG if (shaderinfo) { - glUniform4f(shaderinfo[1], 157 / 255.0, 203 / 255.0, 81 / 255.0, 1.0); - glUniform4f(shaderinfo[2], 171 / 255.0, 216 / 255.0, 86 / 255.0, 1.0); + glUniform4f(shaderinfo[1], 157 / 255.0f, 203 / 255.0f, 81 / 255.0f, 1.0f); + glUniform4f(shaderinfo[2], 171 / 255.0f, 216 / 255.0f, 86 / 255.0f, 1.0f); } #endif /* ENABLE_OPENCSG */ } @@ -167,8 +167,8 @@ void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, double *m glColor4ub(255, 157, 81, 128); #ifdef ENABLE_OPENCSG if (shaderinfo) { - glUniform4f(shaderinfo[1], 255 / 255.0, 157 / 255.0, 81 / 255.0, 0.5); - glUniform4f(shaderinfo[2], 255 / 255.0, 171 / 255.0, 86 / 255.0, 0.5); + glUniform4f(shaderinfo[1], 255 / 255.0f, 157 / 255.0f, 81 / 255.0f, 0.5f); + glUniform4f(shaderinfo[2], 255 / 255.0f, 171 / 255.0f, 86 / 255.0f, 0.5f); } #endif /* ENABLE_OPENCSG */ } @@ -176,8 +176,8 @@ void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, double *m glColor4ub(180, 180, 180, 128); #ifdef ENABLE_OPENCSG if (shaderinfo) { - glUniform4f(shaderinfo[1], 180 / 255.0, 180 / 255.0, 180 / 255.0, 0.5); - glUniform4f(shaderinfo[2], 150 / 255.0, 150 / 255.0, 150 / 255.0, 0.5); + glUniform4f(shaderinfo[1], 180 / 255.0f, 180 / 255.0f, 180 / 255.0f, 0.5f); + glUniform4f(shaderinfo[2], 150 / 255.0f, 150 / 255.0f, 150 / 255.0f, 0.5f); } #endif /* ENABLE_OPENCSG */ } -- cgit v0.10.1 From 438d5cfbc80b128f49c31e57749f937fecfe01b2 Mon Sep 17 00:00:00 2001 From: meta Date: Tue, 18 Jan 2011 00:52:45 +0100 Subject: add some more missing C99 math.h functions diff --git a/src/mathc99.cc b/src/mathc99.cc index db71059..335446e 100644 --- a/src/mathc99.cc +++ b/src/mathc99.cc @@ -1,5 +1,18 @@ #include "mathc99.h" -double found(double a) { - return a > 0 ? floor(a+0.5) : ceil(a-0.5); +#ifdef WIN32 +#include + +double round(double a) { + return a > 0 ? floor(a+0.5) : ceil(a-0.5); +} + +float fmin(float a, float b) { + return std::min(a,b); } + +float fmax(float a, float b) { + return std::max(a,b); +} + +#endif diff --git a/src/mathc99.h b/src/mathc99.h index 4d5d3be..ebc2d66 100644 --- a/src/mathc99.h +++ b/src/mathc99.h @@ -6,6 +6,8 @@ #include //for native win32 builds we need to provide C99 math functions by ourselves double round(double a); +float fmin(float a, float b); +float fmax(float a, float b); #else -- cgit v0.10.1 From a7bf88a9cbb78feb6bd2c9e34ce64cc428d6b708 Mon Sep 17 00:00:00 2001 From: meta Date: Tue, 18 Jan 2011 00:53:52 +0100 Subject: removed unused unistd.h diff --git a/src/mainwin.cc b/src/mainwin.cc index 3373122..7e0a2f6 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -72,9 +72,6 @@ #include "qlanguagefactory.h" #endif -//for chdir -#include - #ifdef ENABLE_CGAL #if 1 -- cgit v0.10.1 From a117735f7631a86d15075a6c1ca404b24e0a1bee Mon Sep 17 00:00:00 2001 From: meta Date: Wed, 19 Jan 2011 00:17:31 +0100 Subject: don't use C99 variable length arrays diff --git a/src/primitives.cc b/src/primitives.cc index ac1f0a3..901d035 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -278,7 +278,7 @@ PolySet *PrimitiveNode::render_polyset(render_mode_e) const }; int rings = get_fragments_from_r(r1, fn, fs, fa); - ring_s ring[rings]; + ring_s *ring = new ring_s[rings]; for (int i = 0; i < rings; i++) { double phi = (M_PI * (i + 0.5)) / rings; @@ -332,6 +332,8 @@ sphere_next_r2: p->append_poly(); for (int i = 0; i < ring[rings-1].fragments; i++) p->insert_vertex(ring[rings-1].points[i].x, ring[rings-1].points[i].y, ring[rings-1].z); + + delete[] ring; } if (type == CYLINDER && h > 0 && r1 >=0 && r2 >= 0 && (r1 > 0 || r2 > 0)) @@ -351,8 +353,8 @@ sphere_next_r2: double x, y; }; - point2d circle1[fragments]; - point2d circle2[fragments]; + point2d *circle1 = new point2d[fragments]; + point2d *circle2 = new point2d[fragments]; for (int i=0; iappend_vertex(circle2[i].x, circle2[i].y, z2); } + + delete[] circle1; + delete[] circle2; } if (type == POLYHEDRON) @@ -444,22 +449,13 @@ sphere_next_r2: { int fragments = get_fragments_from_r(r1, fn, fs, fa); - struct point2d { - double x, y; - }; - - point2d circle[fragments]; + p->is2d = true; + p->append_poly(); - for (int i=0; iappend_vertex(r1*cos(phi), r1*sin(phi)); } - - p->is2d = true; - p->append_poly(); - for (int i=0; iappend_vertex(circle[i].x, circle[i].y); } if (type == POLYGON) -- cgit v0.10.1 From 74faea5ff71ba426aacc83f08f355a8d9d90fd01 Mon Sep 17 00:00:00 2001 From: meta Date: Wed, 19 Jan 2011 00:20:52 +0100 Subject: add missing include diff --git a/src/func.cc b/src/func.cc index 46b29a8..9640321 100644 --- a/src/func.cc +++ b/src/func.cc @@ -29,6 +29,7 @@ #include "dxfdim.h" #include "builtin.h" #include "mathc99.h" +#include AbstractFunction::~AbstractFunction() { -- cgit v0.10.1 From d76a63c022f5ac493e369cbe1641c617e1b4781d Mon Sep 17 00:00:00 2001 From: meta Date: Wed, 19 Jan 2011 00:24:54 +0100 Subject: change literal to help choose a proper overload diff --git a/src/func.cc b/src/func.cc index 9640321..0c0d93f 100644 --- a/src/func.cc +++ b/src/func.cc @@ -290,7 +290,7 @@ Value builtin_log(const Context *, const QVector&, const QVector if (args.size() == 2 && args[0].type == Value::NUMBER && args[1].type == Value::NUMBER) return Value(log(args[1].num) / log(args[0].num)); if (args.size() == 1 && args[0].type == Value::NUMBER) - return Value(log(args[0].num) / log(10)); + return Value(log(args[0].num) / log(10.0)); return Value(); } -- cgit v0.10.1 From ae6517492ed9e54190bde3daefe13c794fea9325 Mon Sep 17 00:00:00 2001 From: meta Date: Wed, 19 Jan 2011 00:32:02 +0100 Subject: remove unused includes diff --git a/src/projection.cc b/src/projection.cc index 7a3f77a..2dd2696 100644 --- a/src/projection.cc +++ b/src/projection.cc @@ -39,9 +39,6 @@ # include #endif -#include -#include -#include #include #include -- cgit v0.10.1 From 929e4340e2307620d56980a45d480a12eb60876d Mon Sep 17 00:00:00 2001 From: meta Date: Wed, 19 Jan 2011 19:37:42 +0100 Subject: __attribute__ ((packed)) equivalent for MSVC diff --git a/src/import.cc b/src/import.cc index bab13ae..7581228 100644 --- a/src/import.cc +++ b/src/import.cc @@ -173,13 +173,24 @@ PolySet *ImportNode::render_polyset(render_mode_e) const { f.read(80-5+4); while (1) { +#ifdef _MSC_VER +#pragma pack(push,1) +#endif struct { float i, j, k; float x1, y1, z1; float x2, y2, z2; float x3, y3, z3; unsigned short acount; - } __attribute__ ((packed)) data; + } +#ifdef __GNUC__ + __attribute__ ((packed)) +#endif + data; +#ifdef _MSC_VER +#pragma pack(pop) +#endif + if (f.read((char*)&data, sizeof(data)) != sizeof(data)) break; p->append_poly(); -- cgit v0.10.1 From 94748bb8d2cb9943f2cfb0accb71fd64f73584fc Mon Sep 17 00:00:00 2001 From: meta Date: Fri, 21 Jan 2011 22:06:50 +0100 Subject: update qmake file for visual C++ builds diff --git a/bison.pri b/bison.pri new file mode 100644 index 0000000..cf67768 --- /dev/null +++ b/bison.pri @@ -0,0 +1,15 @@ +#setup bison for qmake +bison.name = Bison ${QMAKE_FILE_IN} +bison.input = BISONSOURCES +bison.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.parser.cpp +bison.commands = bison -d -o ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.parser.cpp ${QMAKE_FILE_IN} +bison.CONFIG += target_predeps +bison.variable_out = GENERATED_SOURCES +silent:bison.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands +QMAKE_EXTRA_COMPILERS += bison +bison_header.input = BISONSOURCES +bison_header.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.parser.hpp +bison_header.commands = bison -d -o ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.parser.cpp ${QMAKE_FILE_IN} +bison_header.CONFIG += target_predeps no_link +silent:bison_header.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands +QMAKE_EXTRA_COMPILERS += bison_header diff --git a/boost.pri b/boost.pri new file mode 100644 index 0000000..8907b2d --- /dev/null +++ b/boost.pri @@ -0,0 +1,11 @@ +boost { + isEmpty(DEPLOYDIR) { + # Optionally specify location of boost using the + # BOOSTDIR env. variable + BOOST_DIR = $$(BOOSTDIR) + !isEmpty(BOOST_DIR) { + INCLUDEPATH += $$BOOST_DIR + message("boost location: $$BOOST_DIR") + } + } +} diff --git a/cgal.pri b/cgal.pri index 23f0c8c..ed01a44 100644 --- a/cgal.pri +++ b/cgal.pri @@ -12,6 +12,11 @@ cgal { } } - LIBS += -lCGAL -lmpfr -lgmp -lboost_thread + LIBS += -lCGAL -lmpfr -lboost_thread + win32 { + LIBS += -lmpir + } else { + LIBS += -lgmp + } QMAKE_CXXFLAGS += -frounding-math } diff --git a/flex.pri b/flex.pri new file mode 100644 index 0000000..11f6878 --- /dev/null +++ b/flex.pri @@ -0,0 +1,10 @@ +#setup flex for qmake + +flex.name = Flex ${QMAKE_FILE_IN} +flex.input = FLEXSOURCES +flex.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.lexer.cpp +flex.commands = flex -o ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.lexer.cpp ${QMAKE_FILE_IN} +flex.CONFIG += target_predeps +flex.variable_out = GENERATED_SOURCES +silent:flex.commands = @echo Lex ${QMAKE_FILE_IN} && $$flex.commands +QMAKE_EXTRA_COMPILERS += flex diff --git a/openscad.pro b/openscad.pro index 42a5d22..355a129 100644 --- a/openscad.pro +++ b/openscad.pro @@ -1,5 +1,34 @@ -isEmpty(VERSION) VERSION = $$system(date "+%Y.%m.%d") +win32 { + isEmpty(VERSION) VERSION = $$system(date /t) +} else { + isEmpty(VERSION) VERSION = $$system(date "+%Y.%m.%d") +} + + +#configure lex / yacc +win32 { + include(flex.pri) + include(bison.pri) + FLEXSOURCES = src/lexer.l + BISONSOURCES = src/parser.y +} else { + LEXSOURCES += src/lexer.l + YACCSOURCES += src/parser.y +} + +#configure additional directories +win32 { + INCLUDEPATH += $$(MPIRDIR) + INCLUDEPATH += $$(MPFRDIR) +} + DEFINES += OPENSCAD_VERSION=$$VERSION +win32:DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS + +#disable warning about too long decorated names +win32:QMAKE_CXXFLAGS += -wd4503 + + TEMPLATE = app RESOURCES = openscad.qrc @@ -45,6 +74,7 @@ macx:CONFIG += mdi CONFIG += cgal CONFIG += opencsg CONFIG += progresswidget +CONFIG += boost #Uncomment the following line to enable QCodeEdit #CONFIG += qcodeedit @@ -64,6 +94,7 @@ progresswidget { include(cgal.pri) include(opencsg.pri) include(eigen2.pri) +include(boost.pri) # Standard include path for misc external libs #macx { @@ -74,8 +105,6 @@ include(eigen2.pri) # QMAKE_CXXFLAGS += -pg # QMAKE_LFLAGS += -pg -LEXSOURCES += src/lexer.l -YACCSOURCES += src/parser.y FORMS += src/MainWindow.ui \ src/Preferences.ui @@ -103,7 +132,8 @@ HEADERS += src/CGAL_renderer.h \ src/printutils.h \ src/value.h \ src/progress.h \ - src/editor.h + src/editor.h \ + src/mathc99.h SOURCES += src/openscad.cc \ src/mainwin.cc \ @@ -140,7 +170,8 @@ SOURCES += src/openscad.cc \ src/nef2dxf.cc \ src/Preferences.cc \ src/progress.cc \ - src/editor.cc + src/editor.cc \ + src/mathc99.cc macx { HEADERS += src/AppleEvents.h \ -- cgit v0.10.1