Problem happens when running OpenGL on macOS, with a Makefile configuration for Debian GNU/Linux. Replicating the error CMakeList.txt cmake_minimum_required(VERSION 2.8)
project(MY_PROJECT)find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)set(SRCS
src/main.cpp
)add_executable(MY_PROJECT
${SRCS})target_link_libraries(MY_PROJECT
OpenGL::OpenGL
OpenGL::GLU
${GLUT_LIBRARIES})