diff options
author | Brad King <brad.king@kitware.com> | 2022-10-27 12:39:06 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-27 12:39:06 -0400 |
commit | 919ab832e848a4d1ae8b1b0d9960e706bff60c3b (patch) | |
tree | bdb815bf966cf535c08cf48c82156b538ad7d457 /Modules/FindGLUT.cmake | |
parent | 33d610a07695ca4716e376d7411845ccd894c6c0 (diff) | |
download | cmake-919ab832e848a4d1ae8b1b0d9960e706bff60c3b.tar.gz |
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
Diffstat (limited to 'Modules/FindGLUT.cmake')
-rw-r--r-- | Modules/FindGLUT.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index e0636b2f86..09403bc114 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) |