CMake/MinGW/MSYS2: fix building examples with libglew32 (#226)

CMake/resources.cmake: add NAMES option to find_library

examples/CMakeLists.txt: fix linking libGLEW/libglew32
This commit is contained in:
Albrecht Schlosser 2022-03-07 15:03:08 +01:00
parent 9e7f49f56f
commit fbf7a347ec
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ endif ((NOT APPLE) OR OPTION_APPLE_X11)
find_library (LIB_freetype freetype)
find_library (LIB_GL GL)
find_library (LIB_MesaGL MesaGL)
find_library (LIB_GLEW GLEW)
find_library (LIB_GLEW NAMES GLEW glew32)
find_library (LIB_jpeg jpeg)
find_library (LIB_png png)
find_library (LIB_zlib z)

View File

@ -152,7 +152,7 @@ if (APPLE AND (NOT OPTION_APPLE_X11))
endif ()
set (REQUIRED_LIBS fltk_gl fltk ${OPENGL_LIBRARIES})
else ()
set (REQUIRED_LIBS fltk_gl fltk ${OPENGL_LIBRARIES} GLEW)
set (REQUIRED_LIBS fltk_gl fltk ${OPENGL_LIBRARIES} ${LIB_GLEW})
endif ()
if (OPENGL_FOUND AND LIB_GLEW)