From 919ab832e848a4d1ae8b1b0d9960e706bff60c3b Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 27 Oct 2022 12:39:06 -0400 Subject: 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 --- Modules/FindGLUT.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index e0636b2..09403bc 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -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) -- cgit v0.12