summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-12 12:20:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-12 12:21:01 (GMT)
commit1b9630782ab69a7096bd91e58a4e21fa7baade9b (patch)
treea34d7005be8d019ee62099bcc226169ed2c0d592
parentfdd5fc0e1205a3422c8d0ecdb3b4fa50e795515a (diff)
parent2c45465ffb4e855ba5c33bb89eb572c621607493 (diff)
downloadCMake-1b9630782ab69a7096bd91e58a4e21fa7baade9b.zip
CMake-1b9630782ab69a7096bd91e58a4e21fa7baade9b.tar.gz
CMake-1b9630782ab69a7096bd91e58a4e21fa7baade9b.tar.bz2
Merge topic 'FindGLUT-freeglut'
2c45465ffb FindGLUT: Search for freeglut as well using PkgConfig. 804ce3ee42 FindGLUT: Search for "freeglut" first On Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7161
-rw-r--r--Modules/FindGLUT.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 7a16048..43041c5 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -97,6 +97,9 @@ endfunction()
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(GLUT QUIET glut)
+ if(NOT GLUT_FOUND)
+ pkg_check_modules(GLUT QUIET freeglut)
+ endif()
if(GLUT_FOUND)
# GLUT_INCLUDE_DIRS is now the official result variable, but
# older versions of CMake only provided GLUT_INCLUDE_DIR.
@@ -111,7 +114,7 @@ if(WIN32)
find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
mark_as_advanced(GLUT_INCLUDE_DIR)
- find_library( GLUT_glut_LIBRARY_RELEASE NAMES glut glut32 freeglut
+ find_library( GLUT_glut_LIBRARY_RELEASE NAMES freeglut glut glut32
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release