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:04 (GMT)
commit5b9fc1062bd5b3c55753d14f00c605aa96cfda4a (patch)
tree145044e8f80d6fe6dbae2236914dc3fb4bb1a68d
parent27e07abc8bb4fc0837fc83f5c1f21fde57a74c5e (diff)
parent919ab832e848a4d1ae8b1b0d9960e706bff60c3b (diff)
downloadCMake-5b9fc1062bd5b3c55753d14f00c605aa96cfda4a.zip
CMake-5b9fc1062bd5b3c55753d14f00c605aa96cfda4a.tar.gz
CMake-5b9fc1062bd5b3c55753d14f00c605aa96cfda4a.tar.bz2
Merge topic 'FindGLUT-pkg-config'
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)