summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-28 13:59:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-10-28 14:00:03 (GMT)
commit59ae2543165b836d01b88fe0ba4e22ecd549e239 (patch)
treef67e013aa50b9e497582eda36d592b402b095e52
parent4910efb178b0b309c341e53bc197d6a6644fa0ac (diff)
parent919ab832e848a4d1ae8b1b0d9960e706bff60c3b (diff)
downloadCMake-59ae2543165b836d01b88fe0ba4e22ecd549e239.zip
CMake-59ae2543165b836d01b88fe0ba4e22ecd549e239.tar.gz
CMake-59ae2543165b836d01b88fe0ba4e22ecd549e239.tar.bz2
Merge topic 'FindGLUT-pkg-config' into release-3.25
919ab832e8 FindGLUT: Fix regression when pkg-config is not available Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7840
-rw-r--r--Modules/FindGLUT.cmake8
1 files 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)