diff --git a/README.md b/README.md index 30658c0..97cebcc 100644 --- a/README.md +++ b/README.md @@ -526,16 +526,14 @@ you can install/upgrade. #### Troubleshooting -If pygalmesh fails to build due to `fatal error: 'Eigen/Dense' file not found` -you will need to create a symbolic link for Eigen to be detected, e.g. +If pygalmesh fails to build due to `fatal error: 'Eigen/Dense' file not found` set the `EIGEN_INCLUDE_DIR` +environment variable to the path to the Eigen include directory on your system. -``` -cd /usr/local/include -sudo ln -sf eigen3/Eigen Eigen -``` +There is also an environment variable for the location of `CGAL` includes which is `CGAL_INCLUDE_DIR`. `CGAL` +requires linking, so you will also need to make sure that the path to the `lib` dir is in the `LD_LIBRARY_PATH` +environment variable. -It's possible that `eigen3` could be in `/usr/include` instead of -`/usr/local/install`. +When linking against `CGAL >=5.0`, comment out the following line in the `setup.py` file. `libraries=["gmp","mpfr"]`. #### Manual installation diff --git a/setup.py b/setup.py index 5a75a1c..17b60c3 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,8 @@ os.environ.get("EIGEN_INCLUDE_DIR", "/usr/include/eigen3/"), # macos/brew: "/usr/local/include/eigen3", + os.environ.get("CGAL_INCLUDE_DIR"), + os.path.join(os.environ.get("BOOST_ROOT"),"include"), ], # no CGAL libraries necessary from CGAL 5.0 onwards libraries=["gmp", "mpfr"],