summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindGLUT.cmake2
-rw-r--r--Tests/FindGLUT/Test/CMakeLists.txt2
2 files changed, 3 insertions, 1 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()
diff --git a/Tests/FindGLUT/Test/CMakeLists.txt b/Tests/FindGLUT/Test/CMakeLists.txt
index 0f4e536..f6440b2 100644
--- a/Tests/FindGLUT/Test/CMakeLists.txt
+++ b/Tests/FindGLUT/Test/CMakeLists.txt
@@ -9,7 +9,7 @@ target_link_libraries(testglut_tgt GLUT::GLUT)
add_test(NAME testglut_tgt COMMAND testglut_tgt)
add_executable(testglut_var main.c)
-target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIRS})
+target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIR})
target_link_libraries(testglut_var PRIVATE ${GLUT_LIBRARIES})
add_test(NAME testglut_var COMMAND testglut_var)