2009-12-14 00:21:23 +03:00
|
|
|
isEmpty(VERSION) VERSION = $$system(date "+%Y.%m.%d")
|
2009-12-13 03:22:07 +03:00
|
|
|
DEFINES += OPENSCAD_VERSION=$$VERSION
|
|
|
|
TEMPLATE = app
|
2010-01-15 04:00:41 +03:00
|
|
|
RESOURCES = openscad.qrc
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2009-10-25 23:35:03 +03:00
|
|
|
macx {
|
2009-12-13 03:22:07 +03:00
|
|
|
TARGET = OpenSCAD
|
|
|
|
ICON = OpenSCAD.icns
|
|
|
|
QMAKE_INFO_PLIST = Info.plist
|
|
|
|
#CONFIG += x86 ppc
|
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-01-15 11:13:58 +03:00
|
|
|
# CONFIG += mdi
|
2009-12-13 03:22:07 +03:00
|
|
|
CONFIG += cgal
|
|
|
|
CONFIG += opencsg
|
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
|
|
|
|
|
|
|
cgal {
|
2010-01-14 14:09:36 +03:00
|
|
|
# Uncomment this to enable experimental CGAL tesselation
|
|
|
|
# DEFINES += CGAL_TESSELATE
|
2009-12-13 03:22:07 +03:00
|
|
|
DEFINES += ENABLE_CGAL
|
|
|
|
LIBS += -lCGAL
|
|
|
|
macx {
|
|
|
|
INCLUDEPATH += $(PWD)/../install/include /opt/local/include
|
|
|
|
# The -L/usr/lib is to force the linker to use system libraries over MacPort libraries
|
|
|
|
LIBS += -L/usr/lib -L$(PWD)/../install/lib -L/opt/local/lib /opt/local/lib/libgmp.a /opt/local/lib/libmpfr.a /opt/local/lib/libboost_thread-mt.a
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
LIBS += -lmpfr
|
|
|
|
}
|
|
|
|
win32:LIBS += -lboost_thread -lgmp
|
2009-12-25 21:02:05 +03:00
|
|
|
QMAKE_CXXFLAGS += -frounding-math
|
2009-10-25 23:35:03 +03:00
|
|
|
}
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
opencsg {
|
|
|
|
DEFINES += ENABLE_OPENCSG
|
2010-01-03 04:31:09 +03:00
|
|
|
LIBS += -lopencsg
|
2009-12-13 03:22:07 +03:00
|
|
|
unix:LIBS += -lGLEW
|
|
|
|
win32:LIBS += -lglew32
|
2010-01-03 04:31:09 +03:00
|
|
|
|
|
|
|
# Optionally specify location of OpenCSG using the
|
|
|
|
# OPENCSGDIR env. variable
|
2010-01-22 20:00:01 +03:00
|
|
|
OPENCSG_DIR = $(OPENCSGDIR)
|
2010-01-03 04:31:09 +03:00
|
|
|
!isEmpty(OPENCSG_DIR) {
|
|
|
|
INCLUDEPATH += $$OPENCSG_DIR/include
|
|
|
|
LIBS += -L$$OPENCSG_DIR/lib
|
2009-12-13 03:22:07 +03:00
|
|
|
}
|
2010-01-06 07:14:01 +03:00
|
|
|
macx {
|
|
|
|
# For glew
|
|
|
|
INCLUDEPATH += /opt/local/include
|
|
|
|
LIBS += -L/opt/local/lib
|
|
|
|
}
|
2009-12-13 03:22:07 +03:00
|
|
|
}
|
2009-10-17 01:23:30 +04:00
|
|
|
|
2010-01-21 22:18:21 +03:00
|
|
|
include(qtcolorbutton/qtcolorbutton.pri)
|
|
|
|
|
2009-12-13 03:22:07 +03:00
|
|
|
QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentium
|
|
|
|
QMAKE_CXXFLAGS_DEBUG = -O0 -ggdb
|
2009-06-24 14:59:15 +04:00
|
|
|
|
2010-01-10 16:20:00 +03:00
|
|
|
# QMAKE_CFLAGS += -pg
|
|
|
|
# QMAKE_CXXFLAGS += -pg
|
|
|
|
# QMAKE_LFLAGS += -pg
|
|
|
|
|
2009-06-21 15:41:11 +04:00
|
|
|
LEXSOURCES += lexer.l
|
|
|
|
YACCSOURCES += parser.y
|
|
|
|
|
2010-01-15 04:00:41 +03:00
|
|
|
FORMS += MainWindow.ui \
|
|
|
|
Preferences.ui
|
2009-12-09 17:25:09 +03:00
|
|
|
|
|
|
|
HEADERS += openscad.h \
|
|
|
|
MainWindow.h \
|
2010-01-15 04:00:41 +03:00
|
|
|
Preferences.h \
|
2009-12-09 17:25:09 +03:00
|
|
|
GLView.h \
|
2010-01-15 04:00:41 +03:00
|
|
|
printutils.h \
|
|
|
|
CGAL_renderer.h
|
2009-12-09 17:25:09 +03:00
|
|
|
|
2009-12-13 00:27:54 +03:00
|
|
|
macx: HEADERS += EventFilter.h
|
|
|
|
|
2009-12-09 17:25:09 +03:00
|
|
|
SOURCES += openscad.cc mainwin.cc glview.cc export.cc \
|
|
|
|
value.cc expr.cc func.cc module.cc context.cc \
|
|
|
|
csgterm.cc polyset.cc csgops.cc transform.cc \
|
|
|
|
primitives.cc surface.cc control.cc render.cc \
|
2010-01-14 14:09:36 +03:00
|
|
|
import.cc dxfdata.cc dxftess.cc dxftess-glu.cc \
|
|
|
|
dxftess-cgal.cc dxfdim.cc \
|
2009-12-09 17:25:09 +03:00
|
|
|
dxflinextrude.cc dxfrotextrude.cc highlighter.cc \
|
2010-01-15 04:00:41 +03:00
|
|
|
printutils.cc nef2dxf.cc \
|
|
|
|
Preferences.cc
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2009-07-20 21:45:39 +04:00
|
|
|
target.path = /usr/local/bin/
|
|
|
|
INSTALLS += target
|