alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

FindLIBIGL.cmake problem with newer versions of libigl #76

Closed albertofpena closed 5 years ago

albertofpena commented 5 years ago

Hi!

Yesterday I tried to compile mex files on a Mac and had this error:

CMake Error at cmake/FindLIBIGL.cmake:36 (include):
  include could not find load file:

    libigl
Call Stack (most recent call first):
  CMakeLists.txt:34 (find_package)

It seems to be a problem with the line 35 of FindLIBIGL.cmake. The cmake folder in libigl changed from 'shared/cmake' to just 'cmake', so replacing list(APPEND CMAKE_MODULE_PATH "${LIBIGL_INCLUDE_DIR}/../shared/cmake") with list(APPEND CMAKE_MODULE_PATH "${LIBIGL_INCLUDE_DIR}/../cmake") fixed the error for me.

I am not sure if this should be changed in the repository or if there is a way to maintain the backwards compatibility with older versions of libigl, but I hope this helps if anyone meets this error.

Thanks for your work.

maxfrei750 commented 5 years ago

I made a PR (#77) which should fix this, while maintaining backwards compatibility.

alecjacobson commented 5 years ago

Let me know if there's other/more issues.