mirror of https://github.com/vitalif/openscad
look for EIGENDIR env var. (also look for EIGEN2DIR for backwards compatability)
parent
a9045315ba
commit
5d31f56d93
|
@ -9,6 +9,5 @@ include(bison.pri)
|
||||||
include(cgal.pri)
|
include(cgal.pri)
|
||||||
include(opencsg.pri)
|
include(opencsg.pri)
|
||||||
include(glew.pri)
|
include(glew.pri)
|
||||||
include(boost.pri)
|
|
||||||
include(eigen.pri)
|
include(eigen.pri)
|
||||||
|
include(boost.pri)
|
||||||
|
|
|
@ -85,7 +85,7 @@ Some versions of Xvfb may fail, however.
|
||||||
|
|
||||||
1. Trouble finding libraries on unix
|
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:
|
environment variables, just like for the main qmake & openscad.pro. Examples:
|
||||||
|
|
||||||
OPENSCAD_LIBRARIES=$HOME cmake .
|
OPENSCAD_LIBRARIES=$HOME cmake .
|
||||||
|
@ -93,7 +93,7 @@ Some versions of Xvfb may fail, however.
|
||||||
|
|
||||||
Valid variables are as follows:
|
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
|
When running, this might help find your locally built libraries (assuming
|
||||||
you installed into $HOME)
|
you installed into $HOME)
|
||||||
|
|
23
eigen.pri
23
eigen.pri
|
@ -2,18 +2,18 @@
|
||||||
# which eigen to use:
|
# which eigen to use:
|
||||||
#
|
#
|
||||||
# Priority
|
# Priority
|
||||||
# 3. EIGEN3DIR / EIGEN2DIR if set
|
# 0. EIGENDIR if set (also EIGEN2DIR for backwards compatability)
|
||||||
# 1. OPENSCAD_LIBRARIES eigen3
|
# 1. OPENSCAD_LIBRARIES eigen3
|
||||||
# 2. OPENSCAD_LIBRARIES eigen2
|
# 2. OPENSCAD_LIBRARIES eigen2
|
||||||
# 4. system's standard include paths for eigen3
|
# 3. system's standard include paths for eigen3
|
||||||
# 5. system's standard include paths for eigen2
|
# 4. system's standard include paths for eigen2
|
||||||
|
|
||||||
eigen {
|
eigen {
|
||||||
|
|
||||||
# read environment variables
|
# read environment variables
|
||||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||||
EIGEN2_DIR = $$(EIGEN2DIR)
|
EIGEN2_DIR = $$(EIGEN2DIR)
|
||||||
EIGEN3_DIR = $$(EIGEN3DIR)
|
EIGEN_DIR = $$(EIGENDIR)
|
||||||
|
|
||||||
CONFIG(mingw-cross-env) {
|
CONFIG(mingw-cross-env) {
|
||||||
EIGEN_INCLUDEPATH = mingw-cross-env/include/eigen2
|
EIGEN_INCLUDEPATH = mingw-cross-env/include/eigen2
|
||||||
|
@ -36,17 +36,14 @@ CONFIG(mingw-cross-env) {
|
||||||
|
|
||||||
|
|
||||||
# Optionally specify location of Eigen using the
|
# Optionally specify location of Eigen using the
|
||||||
# EIGEN3DIR env. variable
|
# EIGENDIR env. variable (EIGEN2 for backwards compatability)
|
||||||
!isEmpty(EIGEN3_DIR) {
|
|
||||||
EIGEN_INCLUDEPATH = $$EIGEN3_DIR
|
|
||||||
message("EIGEN3 location: $$EIGEN3_INCLUDEPATH")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Optionally specify location of Eigen using the
|
|
||||||
# EIGEN2DIR env. variable
|
|
||||||
!isEmpty(EIGEN2_DIR) {
|
!isEmpty(EIGEN2_DIR) {
|
||||||
EIGEN_INCLUDEPATH = $$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) {
|
isEmpty(EIGEN_INCLUDEPATH) {
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
# MPFRDIR
|
# MPFRDIR
|
||||||
# BOOSTDIR
|
# BOOSTDIR
|
||||||
# CGALDIR
|
# CGALDIR
|
||||||
# EIGEN2DIR
|
# EIGENDIR
|
||||||
# EIGEN3DIR
|
|
||||||
# GLEWDIR
|
# GLEWDIR
|
||||||
# OPENCSGDIR
|
# OPENCSGDIR
|
||||||
# OPENSCAD_LIBRARIES
|
# OPENSCAD_LIBRARIES
|
||||||
|
|
|
@ -179,18 +179,19 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Priority
|
# Priority
|
||||||
# 3. EIGEN3DIR / EIGEN2DIR if set
|
# 3. EIGENDIR if set (EIGEN2DIR for backwards compatability)
|
||||||
# 1. OPENSCAD_LIBRARIES eigen3
|
# 1. OPENSCAD_LIBRARIES eigen3
|
||||||
# 2. OPENSCAD_LIBRARIES eigen2
|
# 2. OPENSCAD_LIBRARIES eigen2
|
||||||
# 4. system's standard include paths for eigen3
|
# 4. system's standard include paths for eigen3
|
||||||
# 5. system's standard include paths for eigen2
|
# 5. system's standard include paths for eigen2
|
||||||
|
|
||||||
set(EIGEN3_DIR "$ENV{EIGEN3DIR}")
|
|
||||||
set(EIGEN2_DIR "$ENV{EIGEN2DIR}")
|
set(EIGEN2_DIR "$ENV{EIGEN2DIR}")
|
||||||
|
set(EIGEN_DIR "$ENV{EIGENDIR}")
|
||||||
set(OPENSCAD_LIBDIR "$ENV{OPENSCAD_LIBRARIES}")
|
set(OPENSCAD_LIBDIR "$ENV{OPENSCAD_LIBRARIES}")
|
||||||
|
|
||||||
if (EIGEN3_DIR)
|
if (EIGEN_DIR)
|
||||||
find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN3_DIR}/include/eigen3" "${EIGEN3_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()
|
endif()
|
||||||
if (EIGEN2_DIR)
|
if (EIGEN2_DIR)
|
||||||
find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN2_DIR}/include/eigen2" "${EIGEN2_DIR}")
|
find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS "${EIGEN2_DIR}/include/eigen2" "${EIGEN2_DIR}")
|
||||||
|
|
Loading…
Reference in New Issue