I am trying to implement shaders and meshes. For doing so I need to link external libraries SDL2, GL, GLEW. I decided to write a CMake file to compile the source file and include the headers and link the required libraries, but it seems like external libraries are not getting linked since i am encountering errors.
Following is my cmake file
cmake_minimum_required(VERSION 3.0)
project(OpenGL)
include_directories(include)
file(GLOB_RECURSE SOURCES "src/*.cpp")
add_executable(Run ${SOURCES})
set(CMAKE_CXX_FLAGS "-g -lGL -lSDL2 -lGLEW")
How do I remove the linking errors ?