Permalink
Browse files

look for EIGENDIR env var. (also look for EIGEN2DIR for backwards com…

…patability)
  • Loading branch information...
donbright committed Aug 19, 2012
1 parent a904531 commit 5d31f56d9313dcaa8f2304819b7d54ff9aaaf01a
Showing with 19 additions and 23 deletions.
  1. +1 −2 common.pri
  2. +2 −2 doc/testing.txt
  3. +10 −13 eigen.pri
  4. +1 −2 openscad.pro
  5. +5 −4 tests/CMakeLists.txt
View
@@ -9,6 +9,5 @@ include(bison.pri)
include(cgal.pri)
include(opencsg.pri)
include(glew.pri)
-include(boost.pri)
include(eigen.pri)
-
+include(boost.pri)
View
@@ -85,15 +85,15 @@ Some versions of Xvfb may fail, however.
1. Trouble finding libraries on unix
- To help CMAKE find eigen2, OpenCSG, CGAL, Boost, and GLEW, you can use
+ To help CMAKE find eigen, OpenCSG, CGAL, Boost, and GLEW, you can use
environment variables, just like for the main qmake & openscad.pro. Examples:
OPENSCAD_LIBRARIES=$HOME cmake .
CGALDIR=$HOME/CGAL-3.9 BOOSTDIR=$HOME/boost-1.47.0 cmake .
Valid variables are as follows:
- BOOSTDIR, CGALDIR, EIGEN2DIR, GLEWDIR, OPENCSGDIR, OPENSCAD_LIBRARIES
+ BOOSTDIR, CGALDIR, EIGENDIR, GLEWDIR, OPENCSGDIR, OPENSCAD_LIBRARIES
When running, this might help find your locally built libraries (assuming
you installed into $HOME)
View
@@ -2,18 +2,18 @@
# which eigen to use:
#
# Priority
-# 3. EIGEN3DIR / EIGEN2DIR if set
+# 0. EIGENDIR if set (also EIGEN2DIR for backwards compatability)
# 1. OPENSCAD_LIBRARIES eigen3
# 2. OPENSCAD_LIBRARIES eigen2
-# 4. system's standard include paths for eigen3
-# 5. system's standard include paths for eigen2
+# 3. system's standard include paths for eigen3
+# 4. system's standard include paths for eigen2
eigen {
# read environment variables
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
EIGEN2_DIR = $$(EIGEN2DIR)
-EIGEN3_DIR = $$(EIGEN3DIR)
+EIGEN_DIR = $$(EIGENDIR)
CONFIG(mingw-cross-env) {
EIGEN_INCLUDEPATH = mingw-cross-env/include/eigen2
@@ -36,17 +36,14 @@ CONFIG(mingw-cross-env) {
# Optionally specify location of Eigen using the
-# EIGEN3DIR env. variable
-!isEmpty(EIGEN3_DIR) {
- EIGEN_INCLUDEPATH = $$EIGEN3_DIR
- message("EIGEN3 location: $$EIGEN3_INCLUDEPATH")
-}
-
-# Optionally specify location of Eigen using the
-# EIGEN2DIR env. variable
+# EIGENDIR env. variable (EIGEN2 for backwards compatability)
!isEmpty(EIGEN2_DIR) {
EIGEN_INCLUDEPATH = $$EIGEN2_DIR
- message("EIGEN2 location: $$EIGEN2_INCLUDEPATH")
+ message("User set EIGEN location: $$EIGEN2_INCLUDEPATH")
+}
+!isEmpty(EIGEN_DIR) {
+ EIGEN_INCLUDEPATH = $$EIGEN_DIR
+ message("User set EIGEN location: $$EIGEN_INCLUDEPATH")
}
isEmpty(EIGEN_INCLUDEPATH) {
View
@@ -3,8 +3,7 @@
# MPFRDIR
# BOOSTDIR
# CGALDIR
-# EIGEN2DIR
-# EIGEN3DIR
+# EIGENDIR
# GLEWDIR
# OPENCSGDIR
# OPENSCAD_LIBRARIES
View
@@ -179,18 +179,19 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()
# Priority
-# 3. EIGEN3DIR / EIGEN2DIR if set
+# 3. EIGENDIR if set (EIGEN2DIR for backwards compatability)
# 1. OPENSCAD_LIBRARIES eigen3
# 2. OPENSCAD_LIBRARIES eigen2
# 4. system's standard include paths for eigen3
# 5. system's standard include paths for eigen2
-set(EIGEN3_DIR "$ENV{EIGEN3DIR}")
set(EIGEN2_DIR "$ENV{EIGEN2DIR}")
+set(EIGEN_DIR "$ENV{EIGENDIR}")
set(OPENSCAD_LIBDIR "$ENV{OPENSCAD_LIBRARIES}")
-if (EIGEN3_DIR)
- find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN3_DIR}/include/eigen3" "${EIGEN3_DIR}")
+if (EIGEN_DIR)
+ set(EIGEN_HINTS "${EIGEN_DIR}/include/eigen3" "${EIGEN_DIR}/include/eigen2" "${EIGEN_DIR}")
+ find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN_HINTS}")
endif()
if (EIGEN2_DIR)
find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN2_DIR}/include/eigen2" "${EIGEN2_DIR}")

0 comments on commit 5d31f56

Please sign in to comment.