summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-19 13:10:33 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-19 13:10:33 (GMT)
commit5d31f56d9313dcaa8f2304819b7d54ff9aaaf01a (patch)
treeb34dfb613c722baf7a50e24acfcb34c6f042aa1c
parenta9045315baac2e8bd24428668cfa88f116984af7 (diff)
look for EIGENDIR env var. (also look for EIGEN2DIR for backwards compatability)
-rw-r--r--common.pri3
-rw-r--r--doc/testing.txt4
-rw-r--r--eigen.pri23
-rw-r--r--openscad.pro3
-rw-r--r--tests/CMakeLists.txt9
5 files changed, 19 insertions, 23 deletions
diff --git a/common.pri b/common.pri
index d852885..71aa510 100644
--- a/common.pri
+++ b/common.pri
@@ -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)
diff --git a/doc/testing.txt b/doc/testing.txt
index 8ab1cee..bbd7c18 100644
--- a/doc/testing.txt
+++ b/doc/testing.txt
@@ -85,7 +85,7 @@ 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 .
@@ -93,7 +93,7 @@ Some versions of Xvfb may fail, however.
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)
diff --git a/eigen.pri b/eigen.pri
index 6f11a53..8037b6f 100644
--- a/eigen.pri
+++ b/eigen.pri
@@ -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) {
diff --git a/openscad.pro b/openscad.pro
index 6532c79..024b788 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -3,8 +3,7 @@
# MPFRDIR
# BOOSTDIR
# CGALDIR
-# EIGEN2DIR
-# EIGEN3DIR
+# EIGENDIR
# GLEWDIR
# OPENCSGDIR
# OPENSCAD_LIBRARIES
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 63e265f..a268df1 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -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}")
contact: Jan Huwald // Impressum