How to know library variable names for CMakeLists?

前端 未结 3 1170
不知归路
不知归路 2020-12-04 02:07

When using CMakeLists to compile an OpenGL project, I have the following line to link glut and gl:

target_link_libraries(my_exe ${OPENGL_gl_LIBRARY} ${GLUT_L         


        
3条回答
  •  长情又很酷
    2020-12-04 02:52

    You don't. It is dependent on the find-module for the library.

    See here.

    Under Writing find modules you see that variables are set in the module. When checking the FindOpenGL.cmake module in your CMake-Modules directory you will see the name of the variable.

提交回复
热议问题