diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-08-18 20:28:36 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-08-18 20:28:36 (GMT) |
commit | 9f6819e68501de16563aeaaadd65dfc915092169 (patch) | |
tree | 26beade954d4748b44ec303e2fd2e12584abe885 /eigen3.pri | |
parent | 8740ac3574c5249c9c22f5436d3b14f4f0563a66 (diff) |
initial rework to enable eigen3 per issue #174.
1. enable eigen3 in qmake build system
2. convert Transform3d and cwise() per the eigen2->eigen3 porting faq online
3. get rid of 'using namespace boost::filesystem' as it conflicts with eigen3
Diffstat (limited to 'eigen3.pri')
-rw-r--r-- | eigen3.pri | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/eigen3.pri b/eigen3.pri new file mode 100644 index 0000000..20d85fc --- /dev/null +++ b/eigen3.pri @@ -0,0 +1,43 @@ +eigen3 { + CONFIG(mingw-cross-env) { + EIGEN3_INCLUDEPATH = mingw-cross-env/include/eigen3 + } + + # Optionally specify location of Eigen3 using the + # OPENSCAD_LIBRARIES env. variable + isEmpty(EIGEN3_INCLUDEPATH) { + OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES) + !isEmpty(OPENSCAD_LIBRARIES_DIR) { + exists($$OPENSCAD_LIBRARIES_DIR/include/eigen3) { + EIGEN3_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/eigen3 + } + } + } + + # Optionally specify location of Eigen3 using the + # EIGEN3DIR env. variable + isEmpty(EIGEN3_INCLUDEPATH) { + EIGEN3_DIR = $$(EIGEN3DIR) + !isEmpty(EIGEN3_DIR) { + EIGEN3_INCLUDEPATH = $$EIGEN3_DIR + message("EIGEN3 location: $$EIGEN3_INCLUDEPATH") + } + } + + isEmpty(EIGEN3_INCLUDEPATH) { + freebsd-g++: EIGEN3_INCLUDEPATH = /usr/local/include/eigen3 + macx: EIGEN3_INCLUDEPATH = /opt/local/include/eigen3 + linux*|hurd*: EIGEN3_INCLUDEPATH = /usr/include/eigen3 + netbsd*: EIGEN3_INCLUDEPATH = /usr/pkg/include/eigen3 + } + + # EIGEN3 being under 'include/eigen3' needs special prepending + QMAKE_INCDIR_QT = $$EIGEN3_INCLUDEPATH $$QMAKE_INCDIR_QT + + # disable Eigen SIMD optimizations for platforms where it breaks compilation + !macx { + !freebsd-g++ { + QMAKE_CXXFLAGS += -DEIGEN_DONT_ALIGN + } + } +} |