Closed saigowri closed 6 years ago
@saigowri: On the off-chance that you haven't solved the problem since opening the issue, here's a link that should help:
https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html
Basically, if you want to link the OpenGL and GLUT libraries into your application, which for the sake of argument we'll call Foo
, then you add this to your CMakeLists.txt:
TARGET_LINK_LIBRARIES(Foo ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
The following statements are added to the CMakeLists.txt file - find_package(GLUT REQUIRED) find_package(OpenGL REQUIRED) where do i add ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ? I read somewhere that they must be placed in the related target link libraries. Where exactly is that?