cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
539 stars 58 forks source link

Add the installation prefix of "glm" to CMAKE_PREFIX_PATH or set "glm_DIR" #402

Open smarchevsky opened 4 years ago

smarchevsky commented 4 years ago

make -D CMAKE_PREFIX_PATH=../../glm .. Do nothing, it cant find it anyway.

scheibel commented 3 years ago

I encountered a change in the setup of glm (don't know when it happened), where the file CMake searches for is in a different directory.

In a former setup that we used until recently, the file glmConfig.cmake was generated in the root directory of glm. With this setup, both your approaches - (1) CMAKE_PREFIX_PATH="../../glm" and (2) glm_DIR="../../glm" - should have worked.

For the more current releases and branches of glm, this file moved to cmake/glm/glmConfig.cmake. I tested this on the glm 0.9.9.8 tag. With this version (and presumably other newer ones as well) your configuration command should look something like this

> cmake -DCMAKE_PREFIX_PATH="../../glm/cmake/glm" ...

or this

> glm_DIR="../../glm/cmake/glm" cmake ...