It should be something like this:
find_package(GLEW REQUIRED) find_package(GLUT REQUIRED) include_directories( ${GLEW_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ) target_link_libraries( project_name ${GLEW_LIBRARIES} ${GLUT_LIBRARY} )
Link to small lessons, in the content of which you will find the information you are interested in - link , link
find_package - look for the CMake extension; used with REQUIRED - this means that in case of unsuccessful search assembly will be interrupted.
target_link_libraries - we list the instructions that need to be added to the assembly file to connect to the project of third-party libraries.
Something went wrong ? You go to cmake.org, you are looking for the necessary extensions, see which macros are defined there for a specific extension, if something has changed - change, try .. - does not work? - come back - we understand.