2011-01-22 00:39:34 +03:00
|
|
|
# Auto-include config_<variant>.pri if the VARIANT variable is give on the
|
|
|
|
# command-line, e.g. qmake VARIANT=mybuild
|
|
|
|
!isEmpty(VARIANT) {
|
|
|
|
message("Variant: $${VARIANT}")
|
|
|
|
exists(config_$${VARIANT}.pri) {
|
|
|
|
message("Including config_$${VARIANT}.pri")
|
|
|
|
include(config_$${VARIANT}.pri)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-22 00:06:50 +03:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
DEFINES += OPENSCAD_VERSION=$$VERSION
|
2011-01-25 02:21:36 +03:00
|
|
|
win32:DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS YY_NO_UNISTD_H
|
2011-01-22 00:06:50 +03:00
|
|
|
|
|
|
|
#disable warning about too long decorated names
|
|
|
|
win32:QMAKE_CXXFLAGS += -wd4503
|
|
|
|
|
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
TEMPLATE = app
|
2010-01-15 04:00:41 +03:00
|
|
|
RESOURCES = openscad.qrc
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2010-01-30 07:27:59 +03:00
|
|
|
OBJECTS_DIR = objects
|
|
|
|
MOC_DIR = objects
|
|
|
|
UI_DIR = objects
|
|
|
|
RCC_DIR = objects
|
|
|
|
INCLUDEPATH += src
|
|
|
|
|
2009-10-25 23:35:03 +03:00
|
|
|
macx {
|
2010-05-10 21:43:42 +04:00
|
|
|
DEPLOYDIR = $$(MACOSX_DEPLOY_DIR)
|
|
|
|
!isEmpty(DEPLOYDIR) {
|
|
|
|
INCLUDEPATH += $$DEPLOYDIR/include
|
|
|
|
LIBS += -L$$DEPLOYDIR/lib
|
|
|
|
}
|
2010-05-07 20:24:26 +04:00
|
|
|
# add CONFIG+=deploy to the qmake command-line to make a deployment build
|
|
|
|
deploy {
|
|
|
|
message("Building deployment version")
|
2010-05-08 07:57:31 +04:00
|
|
|
CONFIG += x86 x86_64
|
2010-05-07 20:24:26 +04:00
|
|
|
}
|
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
TARGET = OpenSCAD
|
2010-01-30 07:27:59 +03:00
|
|
|
ICON = icons/OpenSCAD.icns
|
2009-12-13 03:22:07 +03:00
|
|
|
QMAKE_INFO_PLIST = Info.plist
|
2010-02-02 04:01:58 +03:00
|
|
|
APP_RESOURCES.path = Contents/Resources
|
|
|
|
APP_RESOURCES.files = OpenSCAD.sdef
|
|
|
|
QMAKE_BUNDLE_DATA += APP_RESOURCES
|
|
|
|
LIBS += -framework Carbon
|
2009-10-25 23:35:03 +03:00
|
|
|
}
|
|
|
|
else {
|
2009-12-13 03:22:07 +03:00
|
|
|
TARGET = openscad
|
2009-10-25 23:35:03 +03:00
|
|
|
}
|
|
|
|
|
2010-01-16 00:08:18 +03:00
|
|
|
win32 {
|
|
|
|
RC_FILE = openscad_win32.rc
|
|
|
|
}
|
|
|
|
|
2009-12-12 00:38:28 +03:00
|
|
|
CONFIG += qt
|
2009-12-13 03:22:07 +03:00
|
|
|
QT += opengl
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
# Application configuration
|
2010-02-01 03:26:04 +03:00
|
|
|
macx:CONFIG += mdi
|
2009-12-13 03:22:07 +03:00
|
|
|
CONFIG += cgal
|
|
|
|
CONFIG += opencsg
|
2010-02-28 17:26:05 +03:00
|
|
|
CONFIG += progresswidget
|
2011-01-22 00:06:50 +03:00
|
|
|
CONFIG += boost
|
2010-04-03 07:05:36 +04:00
|
|
|
|
|
|
|
#Uncomment the following line to enable QCodeEdit
|
|
|
|
#CONFIG += qcodeedit
|
2009-10-28 23:11:56 +03:00
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
mdi {
|
|
|
|
# MDI needs an OpenCSG library that is compiled with OpenCSG-Reset-Hack.patch applied
|
|
|
|
DEFINES += ENABLE_MDI
|
2009-10-25 23:35:03 +03:00
|
|
|
}
|
2009-12-13 03:22:07 +03:00
|
|
|
|
2010-02-10 18:13:12 +03:00
|
|
|
progresswidget {
|
|
|
|
DEFINES += USE_PROGRESSWIDGET
|
|
|
|
FORMS += src/ProgressWidget.ui
|
|
|
|
HEADERS += src/ProgressWidget.h
|
|
|
|
SOURCES += src/ProgressWidget.cc
|
|
|
|
}
|
|
|
|
|
2010-01-30 07:27:59 +03:00
|
|
|
include(cgal.pri)
|
|
|
|
include(opencsg.pri)
|
2010-03-31 04:25:04 +04:00
|
|
|
include(eigen2.pri)
|
2011-01-22 00:06:50 +03:00
|
|
|
include(boost.pri)
|
2010-01-21 22:18:21 +03:00
|
|
|
|
2010-03-31 04:25:04 +04:00
|
|
|
# Standard include path for misc external libs
|
2010-05-07 20:24:26 +04:00
|
|
|
#macx {
|
|
|
|
# INCLUDEPATH += /opt/local/include
|
|
|
|
#}
|
2010-01-30 21:30:54 +03:00
|
|
|
|
2010-01-10 16:20:00 +03:00
|
|
|
# QMAKE_CFLAGS += -pg
|
|
|
|
# QMAKE_CXXFLAGS += -pg
|
|
|
|
# QMAKE_LFLAGS += -pg
|
|
|
|
|
2010-01-30 07:27:59 +03:00
|
|
|
|
|
|
|
FORMS += src/MainWindow.ui \
|
|
|
|
src/Preferences.ui
|
|
|
|
|
2011-07-30 23:29:40 +04:00
|
|
|
HEADERS += src/renderer.h \
|
|
|
|
src/cgalrenderer.h \
|
2011-08-04 02:45:40 +04:00
|
|
|
src/ThrownTogetherRenderer.h \
|
2011-07-30 23:29:40 +04:00
|
|
|
src/CGAL_renderer.h \
|
2011-04-09 08:51:58 +04:00
|
|
|
src/OGL_helper.h \
|
2010-01-30 07:27:59 +03:00
|
|
|
src/GLView.h \
|
|
|
|
src/MainWindow.h \
|
|
|
|
src/Preferences.h \
|
|
|
|
src/builtin.h \
|
|
|
|
src/cgal.h \
|
|
|
|
src/context.h \
|
|
|
|
src/csgterm.h \
|
|
|
|
src/dxfdata.h \
|
|
|
|
src/dxfdim.h \
|
|
|
|
src/dxftess.h \
|
|
|
|
src/export.h \
|
|
|
|
src/expression.h \
|
|
|
|
src/function.h \
|
|
|
|
src/grid.h \
|
|
|
|
src/highlighter.h \
|
|
|
|
src/module.h \
|
|
|
|
src/node.h \
|
2010-03-02 21:22:31 +03:00
|
|
|
src/csgnode.h \
|
|
|
|
src/dxflinextrudenode.h \
|
|
|
|
src/dxfrotextrudenode.h \
|
|
|
|
src/projectionnode.h \
|
|
|
|
src/importnode.h \
|
2010-03-28 19:57:39 +04:00
|
|
|
src/transformnode.h \
|
|
|
|
src/rendernode.h \
|
2010-01-30 07:27:59 +03:00
|
|
|
src/openscad.h \
|
|
|
|
src/polyset.h \
|
|
|
|
src/printutils.h \
|
2010-02-09 16:48:09 +03:00
|
|
|
src/value.h \
|
2010-04-03 07:05:14 +04:00
|
|
|
src/progress.h \
|
2010-03-02 21:22:31 +03:00
|
|
|
src/editor.h \
|
|
|
|
src/visitor.h \
|
|
|
|
src/state.h \
|
|
|
|
src/traverser.h \
|
|
|
|
src/nodecache.h \
|
2010-03-19 06:07:38 +03:00
|
|
|
src/nodedumper.h \
|
2011-07-31 03:58:51 +04:00
|
|
|
src/CGALEvaluator.h \
|
|
|
|
src/PolySetEvaluator.h \
|
|
|
|
src/PolySetCGALEvaluator.h \
|
|
|
|
src/CSGTermEvaluator.h \
|
2010-11-03 21:23:05 +03:00
|
|
|
src/myqhash.h \
|
2011-04-12 22:35:44 +04:00
|
|
|
src/Tree.h \
|
2011-08-04 06:58:17 +04:00
|
|
|
src/mathc99.h \
|
|
|
|
src/stl-utils.h
|
2010-01-30 07:27:59 +03:00
|
|
|
|
|
|
|
SOURCES += src/openscad.cc \
|
|
|
|
src/mainwin.cc \
|
2011-07-30 23:29:40 +04:00
|
|
|
src/cgalrenderer.cc \
|
2011-08-04 02:45:40 +04:00
|
|
|
src/ThrownTogetherRenderer.cc \
|
2010-01-30 07:27:59 +03:00
|
|
|
src/glview.cc \
|
|
|
|
src/export.cc \
|
|
|
|
src/value.cc \
|
|
|
|
src/expr.cc \
|
|
|
|
src/func.cc \
|
|
|
|
src/module.cc \
|
|
|
|
src/node.cc \
|
|
|
|
src/context.cc \
|
|
|
|
src/csgterm.cc \
|
|
|
|
src/polyset.cc \
|
|
|
|
src/csgops.cc \
|
|
|
|
src/transform.cc \
|
|
|
|
src/primitives.cc \
|
2010-01-30 10:41:55 +03:00
|
|
|
src/projection.cc \
|
2010-02-20 17:37:20 +03:00
|
|
|
src/cgaladv.cc \
|
2011-04-09 13:27:50 +04:00
|
|
|
src/cgaladv_convexhull2.cc \
|
2010-03-03 22:27:22 +03:00
|
|
|
src/cgaladv_minkowski3.cc \
|
|
|
|
src/cgaladv_minkowski2.cc \
|
2010-01-30 07:27:59 +03:00
|
|
|
src/surface.cc \
|
|
|
|
src/control.cc \
|
|
|
|
src/render.cc \
|
|
|
|
src/import.cc \
|
|
|
|
src/dxfdata.cc \
|
|
|
|
src/dxftess.cc \
|
|
|
|
src/dxftess-glu.cc \
|
|
|
|
src/dxftess-cgal.cc \
|
|
|
|
src/dxfdim.cc \
|
|
|
|
src/dxflinextrude.cc \
|
|
|
|
src/dxfrotextrude.cc \
|
|
|
|
src/highlighter.cc \
|
|
|
|
src/printutils.cc \
|
|
|
|
src/nef2dxf.cc \
|
2010-02-09 16:48:09 +03:00
|
|
|
src/Preferences.cc \
|
2010-04-03 07:05:14 +04:00
|
|
|
src/progress.cc \
|
2010-04-03 07:17:54 +04:00
|
|
|
src/editor.cc \
|
2010-03-02 21:22:31 +03:00
|
|
|
src/traverser.cc \
|
2010-03-19 06:07:38 +03:00
|
|
|
src/nodedumper.cc \
|
2011-07-31 03:58:51 +04:00
|
|
|
src/CGALEvaluator.cc \
|
|
|
|
src/PolySetEvaluator.cc \
|
|
|
|
src/PolySetCGALEvaluator.cc \
|
|
|
|
src/CSGTermEvaluator.cc \
|
2010-07-12 01:29:01 +04:00
|
|
|
src/qhash.cc \
|
2011-04-12 22:35:44 +04:00
|
|
|
src/Tree.cc \
|
2011-04-09 13:27:50 +04:00
|
|
|
src/mathc99.cc
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2010-02-02 04:01:58 +03:00
|
|
|
macx {
|
|
|
|
HEADERS += src/AppleEvents.h \
|
|
|
|
src/EventFilter.h
|
|
|
|
SOURCES += src/AppleEvents.cc
|
|
|
|
}
|
|
|
|
|
2009-07-20 21:45:39 +04:00
|
|
|
target.path = /usr/local/bin/
|
|
|
|
INSTALLS += target
|
2010-02-27 13:38:13 +03:00
|
|
|
|
|
|
|
examples.path = /usr/local/share/openscad/examples/
|
|
|
|
examples.files = examples/*
|
|
|
|
INSTALLS += examples
|
|
|
|
|
|
|
|
libraries.path = /usr/local/share/openscad/libraries/
|
|
|
|
libraries.files = libraries/*
|
|
|
|
INSTALLS += libraries
|