Issues adding GLFW source to a CMake project

Hi Doug, thanks for the fast reply.
I’ve modified my CMakeLists.txt as you suggested, but I still get the same error.
Here’s my full CMakeLists.txt:

cmake_minimum_required(VERSION 3.5)

project(CppSnake)

set(HEADER_FILES Apple.hpp IndexBuffer.hpp Quad.hpp Random.hpp Renderer.hpp Shader.hpp Snake.hpp Vertex.hpp VertexArray.hpp VertexBuffer.hpp VertexBufferLayout.hpp)

add_executable(${PROJECT_NAME} main.cpp ${HEADER_FILES})

target_include_directories(${PROJECT_NAME} vendor/glad/include vendor/glfw/include)

add_subdirectory(vendor/glad)
target_link_libraries(${PROJECT_NAME} glad)
target_link_libraries(${PROJECT_NAME} dl)

set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
find_package(OpenGL REQUIRED)
add_subdirectory(vendor/glfw)
target_link_libraries(${PROJECT_NAME} glfw ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES})

target_link_libraries(${PROJECT_NAME} GL)

I really don’t understand why it is complaining about pthread things