OpenGL not found when building CMake project in Mac OS Catalina

Viewed 674

I am trying to build a CMake project in CLion.

When I try to load the project I receive the following error:

CMake Error at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find OpenGL (missing: OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.16/Modules/FindOpenGL.cmake:397 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:6 (find_package)

I have done some reading on the internet and apparently OpenGL and GLUT come installed with OS X, or at least with earlier versions. I recently switched to Catalina and I don't know if this is still the case with Catalina.

I installed freeglut to try to resolve my issue, but it still isn't working, which makes me wonder if freeglut is compiled for 32-bit applications and is therefore not compatible with Catalina.

Has anyone had a similar problem and found a solution?

0 Answers
Related