fbx-extract icon indicating copy to clipboard operation
fbx-extract copied to clipboard

CMake Error: Environment variable for GLM_INCLUDE_DIR

Open domattioli opened this issue 2 years ago • 7 comments

I git cloned the GLM library to the same directory that I've cloned fbx-extract. I went into the glm library and performed the cmake command:

/usr/include/glm/cmake$ cmake ..
-- GLM: Version 0.9.9.9
GLM: GCC - GNU compiler
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/include/glm/cmake

Following your instructions, I get a CMake error:

/usr/include/fbx-extract/build$ sudo cmake ..
CMake Error at CMakeLists.txt:31 (MESSAGE):
  Please point the environment variable GLM_INCLUDE_DIR to the root directory
  of your GLM installation.


-- Configuring incomplete, errors occurred!
See also "/usr/include/fbx-extract/build/CMakeFiles/CMakeOutput.log".

I'm using Ubuntu on Windows. Here is the end of my ~/.profile file: export GLM_INCLUDE_DIR="/usr/include/glm"

And a sanity check:

/usr/include/fbx-extract/build$ echo $GLM_INCLUDE_DIR
/usr/include/glm

What have I done wrong?

domattioli avatar Aug 17 '22 23:08 domattioli

Here is the CMakeOutput.log file.

domattioli avatar Aug 17 '22 23:08 domattioli

Please see the writeup here on setting up the environment.

sueda avatar Aug 18 '22 00:08 sueda

I did follow the write-up, installing each of GLM, GLEW, and GLFW. My environment variable also includes the respective directories as I have shown above, however, fbx-extract's cmake output suggests that there is a mismatch between it's reading of the environment variable and the actual value.

domattioli avatar Aug 18 '22 12:08 domattioli

What does ls $GLM_INCLUDE_DIR output?

➜  ~ ls $GLM_INCLUDE_DIR
CMakeLists.txt copying.txt    glm            readme.md      util
cmake          doc            manual.md      test

sueda avatar Aug 18 '22 15:08 sueda

$ ls $GLM_INCLUDE_DIR
CMakeCache.txt  CMakeLists.txt       Makefile  cmake_install.cmake  doc  manual.md  test
CMakeFiles      CTestTestfile.cmake  cmake     copying.txt          glm  readme.md  util

The build succeeds if I go into the CMakeLists.txt file and hardcode the directory for GLM.

domattioli avatar Aug 18 '22 18:08 domattioli

It may be a version issue. Maybe it would be better to include the GLM source in the project to increase compatibility. I'll keep this issue open for now. (Good to hear you got it to work by hardcoding.)

sueda avatar Aug 18 '22 18:08 sueda

I had the same error, but it was built after setting CMAKE_PROJECT_NAME as a user env to the latest GLM I had cloned from GitHub. I used CLion.

sascharo avatar Oct 21 '22 05:10 sascharo