From: Matthew Fernandez Date: Sat, 5 Nov 2022 20:52:26 +0000 (-0700) Subject: CMake: use legacy 'GLUT_INCLUDE_DIR' instead of 'GLUT_INCLUDE_DIRS' X-Git-Tag: 7.0.1~1^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e78c29021b5bc4f79d941319fb1be91872c4736;p=graphviz CMake: use legacy 'GLUT_INCLUDE_DIR' instead of 'GLUT_INCLUDE_DIRS' The newer `GLUT_INCLUDE_DIRS` is only provided in CMake ≥ 3.23. Most users and most of our CI environments are on a version of CMake prior to this and so get the following when configuring with `--warn-uninitialized -Werror=dev`: CMake Error (dev) at cmd/smyrna/CMakeLists.txt:87 (target_include_directories): uninitialized variable 'GLUT_INCLUDE_DIRS' Gitlab: #2291 --- diff --git a/cmd/smyrna/CMakeLists.txt b/cmd/smyrna/CMakeLists.txt index e2df60059..f42e0077a 100644 --- a/cmd/smyrna/CMakeLists.txt +++ b/cmd/smyrna/CMakeLists.txt @@ -88,7 +88,7 @@ if(with_smyrna) ${EXPAT_INCLUDE_DIRS} ${FONTCONFIG_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} - ${GLUT_INCLUDE_DIRS} + ${GLUT_INCLUDE_DIR} ${GTK2_INCLUDE_DIRS} ${GTKGLEXT_INCLUDE_DIRS} ${GTS_INCLUDE_DIRS} diff --git a/lib/glcomp/CMakeLists.txt b/lib/glcomp/CMakeLists.txt index fd9c7c872..061cb1a3a 100644 --- a/lib/glcomp/CMakeLists.txt +++ b/lib/glcomp/CMakeLists.txt @@ -42,7 +42,7 @@ if(with_smyrna) target_include_directories(glcomp SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS} - ${GLUT_INCLUDE_DIRS} + ${GLUT_INCLUDE_DIR} ${GTK2_INCLUDE_DIRS} ${PANGOCAIRO_INCLUDE_DIRS} ${XRENDER_INCLUDE_DIRS}