From 43191c753070abe6cf1a1752d6b7e1d45d0f45a8 Mon Sep 17 00:00:00 2001 From: David Gow Date: Fri, 6 Jun 2025 23:42:50 +0800 Subject: [PATCH] miniwin: Use the GLEW::GLEW target to find glew. (#246) On some systems, the old-style GLEW_TARGET_LIBRARIES variable is not set by find_package(GLEW), and instead we must use the newer GLEW::GLEW target, as we do for OpenGL. This fixes a build error on openSUSE Tumbleweed, which has a glew CMake config in /usr/lib64/cmake/glew/glew-config.cmake. --- miniwin/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/miniwin/CMakeLists.txt b/miniwin/CMakeLists.txt index 65d1584e..58ce92f7 100644 --- a/miniwin/CMakeLists.txt +++ b/miniwin/CMakeLists.txt @@ -30,8 +30,7 @@ if(OpenGL_FOUND AND GLEW_FOUND) # Find and link OpenGL (1.5) target_link_libraries(miniwin PRIVATE OpenGL::GL) # Glew is used for getting a FBO for off screen rendering - target_include_directories(miniwin PRIVATE ${GLEW_INCLUDE_DIRS}) - target_link_libraries(miniwin PRIVATE ${GLEW_LIBRARIES}) + target_link_libraries(miniwin PRIVATE GLEW::GLEW) endif() # Force reported render mods from MiniWin