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
|
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
|
|
|
}
|
|
|
|
|
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
|
2009-12-12 00:38:28 +03:00
|
|
|
CONFIG += debug
|
|
|
|
# CONFIG += release
|
2010-01-03 12:35:09 +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 {
|
|
|
|
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
|
|
|
|
OPENCSG_DIR = $$(OPENCSGDIR)
|
|
|
|
!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
|
|
|
|
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
|
|
|
|
|
2009-12-09 17:25:09 +03:00
|
|
|
FORMS += MainWindow.ui
|
|
|
|
|
|
|
|
HEADERS += openscad.h \
|
|
|
|
MainWindow.h \
|
|
|
|
GLView.h \
|
|
|
|
printutils.h
|
|
|
|
|
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 \
|
|
|
|
import.cc dxfdata.cc dxftess.cc dxfdim.cc \
|
|
|
|
dxflinextrude.cc dxfrotextrude.cc highlighter.cc \
|
2010-01-05 22:09:01 +03:00
|
|
|
printutils.cc nef2dxf.cc
|
2009-06-20 16:10:55 +04:00
|
|
|
|
2009-07-20 21:45:39 +04:00
|
|
|
target.path = /usr/local/bin/
|
|
|
|
INSTALLS += target
|