diff options
author | meta <s@w23.at> | 2011-01-21 21:06:50 (GMT) |
---|---|---|
committer | meta <s@w23.at> | 2011-01-21 21:06:50 (GMT) |
commit | 94748bb8d2cb9943f2cfb0accb71fd64f73584fc (patch) | |
tree | 04e43b53e8800fe7d6fc0ec95b693273f347e3f7 | |
parent | 929e4340e2307620d56980a45d480a12eb60876d (diff) |
update qmake file for visual C++ builds
-rw-r--r-- | bison.pri | 15 | ||||
-rw-r--r-- | boost.pri | 11 | ||||
-rw-r--r-- | cgal.pri | 7 | ||||
-rw-r--r-- | flex.pri | 10 | ||||
-rw-r--r-- | openscad.pro | 41 |
5 files changed, 78 insertions, 6 deletions
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")
+ }
+ }
+}
@@ -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 \ |