Skip to content

Commit

Permalink
cmake: link to windows opengl if ANGLE is not used wang-bin#812
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Feb 4, 2017
1 parent bc60860 commit 2789964
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ set(OPENGLES 0) #glesv2
if(Qt5Gui_OPENGL_IMPLEMENTATION STREQUAL GL) # windows always set to GL
set(OPENGL 1)
if(EXISTS ${QT_INSTALL_HEADERS}/QtANGLE)
set(DYNAMIC_GL 1)
set(DYNAMIC_GL 1) # assume Qt5Gui_OPENGL_IMPLEMENTATION is not GL if build with ANGLE only
if(NOT DEFINED Qt5Gui_EGL_INCLUDE_DIRS)
set(Qt5Gui_EGL_INCLUDE_DIRS ${QT_INSTALL_HEADERS}/QtANGLE)
endif()
Expand All @@ -210,6 +210,12 @@ set(HAVE_OPENGL 1) # qt with opengl enabled
if(NOT OPENGL AND NOT OPENGLES AND NOT DYNAMIC_GL)
set(HAVE_OPENGL 0)
endif()
if(HAVE_OPENGL)
if(WIN32 AND NOT DYNAMIC_GL AND NOT OPENGLES) # msys2
find_package(OpenGL REQUIRED)
list(APPEND EXTRA_LIBS ${OPENGL_gl_LIBRARY})
endif()
endif()

file(GLOB SDK_HEADERS QtAV/*.h)
list(APPEND SDK_HEADERS QtAV/QtAV)
Expand Down

0 comments on commit 2789964

Please sign in to comment.