Qt5 with OpenGL CMake

CMake File

cmake_minimum_required(VERSION 3.6)
project(writer)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)

find_package(Qt5 REQUIRED COMPONENTS Widgets Core)
find_package(glfw3 3.2 REQUIRED)
find_package(OpenGL REQUIRED)

set(SOURCE_FILES main.cpp)
add_executable(writer ${SOURCE_FILES})
qt5_use_modules(writer Core Gui Widgets)


include_directories(${OPENGL_INCLUDE_DIR})
target_link_libraries(writer Qt5::Widgets ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} glfw)
-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.6.0/