summaryrefslogtreecommitdiffstats
path: root/Modules/FindGLUT.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-17 17:59:51 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-17 20:17:29 (GMT)
commitae6b25d920325585f0e7f56d23d2b0f8e0b39af8 (patch)
tree86c4f7bc3d716d7292cc082d06a009774eb10e87 /Modules/FindGLUT.cmake
parent92ecf5c9897e03575ac47be3a4f720b1861d3760 (diff)
downloadCMake-ae6b25d920325585f0e7f56d23d2b0f8e0b39af8.zip
CMake-ae6b25d920325585f0e7f56d23d2b0f8e0b39af8.tar.gz
CMake-ae6b25d920325585f0e7f56d23d2b0f8e0b39af8.tar.bz2
FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config provides the information. During review of that commit, code to populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from that code path. Add code to provide it. Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable documented officially by the module. Fixes: #23018
Diffstat (limited to 'Modules/FindGLUT.cmake')
-rw-r--r--Modules/FindGLUT.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index dd0975d..636f1ea 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -71,6 +71,8 @@ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(GLUT glut)
if(GLUT_FOUND)
+ # In the non-pkg-config code path we only provide GLUT_INCLUDE_DIR.
+ set(GLUT_INCLUDE_DIR "${GLUT_INCLUDE_DIRS}")
_add_glut_target_simple()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_FOUND)
return()