FindGLUT: Fix regression when pkg-config is not available

In commit a2fc4b6257 (FindGLUT: Drop the now-unnecessary exclusion of
pkg-config for multiconfig, 2022-10-13, v3.25.0-rc2~16^2) we
accidentally removed the entire condition around the `pkg-config` code
path instead of just the multi-config part.

Fixes: #24095
This commit is contained in:
Brad King
2022-10-27 12:39:06 -04:00
parent 33d610a076
commit 919ab832e8

View File

@@ -68,9 +68,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_GLUT QUIET glut)
if(NOT PC_GLUT_FOUND)
pkg_check_modules(PC_GLUT QUIET freeglut)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_GLUT QUIET glut)
if(NOT PC_GLUT_FOUND)
pkg_check_modules(PC_GLUT QUIET freeglut)
endif()
endif()
if(WIN32)