]> granicus.if.org Git - graphviz/commitdiff
CMake: use legacy 'GLUT_INCLUDE_DIR' instead of 'GLUT_INCLUDE_DIRS'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Nov 2022 20:52:26 +0000 (13:52 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 8 Nov 2022 04:52:51 +0000 (20:52 -0800)
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

cmd/smyrna/CMakeLists.txt
lib/glcomp/CMakeLists.txt

index e2df6005941acaf4050f968d40763a7fca41b69b..f42e0077af03bad1fc8a0061063b10c4e90e384a 100644 (file)
@@ -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}
index fd9c7c872002ce2e16a8a0557e4363f8ce231eca..061cb1a3ace4cef7b21d945c9cd3f2253bb2eaaa 100644 (file)
@@ -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}