Skip to content

Commit

Permalink
Fix linking of GLEW library
Browse files Browse the repository at this point in the history
FindGLEW.cmake Module silently tries to include glew-config.cmake.
If it succeeds, then it stop and return to the caller.
Howevew, glew-config.cmake only sets GLEW::GLEW, resulting in
missing glew shared library at link time.
  • Loading branch information
danyspin97 committed Jun 5, 2020
1 parent ae84018 commit ad9d155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ target_link_libraries(${LIBRARY_NAME} ${X11_LIBRARIES}

if ( SLOP_OPENGL )
include_directories( ${XEXT_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
GLEW::GLEW
${XRENDER_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR} )
target_link_libraries(${LIBRARY_NAME} ${OPENGL_LIBRARIES}
${XRENDER_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${GLX_LIBRARY}
${GLEW_LIBRARIES})
GLEW::GLEW)
endif()

target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME} )
Expand Down

0 comments on commit ad9d155

Please sign in to comment.