Pārlūkot izejas kodu

Merge topic 'FindDoxygen-win-glob'

85a035bf00 FindDoxygen: Avoid Windows-specific GLOB on other platforms

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2660
Brad King 7 gadi atpakaļ
vecāks
revīzija
e3ec574834
1 mainītis faili ar 12 papildinājumiem un 7 dzēšanām
  1. 12 7
      Modules/FindDoxygen.cmake

+ 12 - 7
Modules/FindDoxygen.cmake

@@ -485,12 +485,18 @@ endmacro()
 # Find Graphviz Dot...
 #
 macro(_Doxygen_find_dot)
-    set(_x86 "(x86)")
-    file(
-        GLOB _Doxygen_GRAPHVIZ_BIN_DIRS
-        "$ENV{ProgramFiles}/Graphviz*/bin"
-        "$ENV{ProgramFiles${_x86}}/Graphviz*/bin"
-    )
+    if(WIN32)
+        set(_x86 "(x86)")
+        file(
+            GLOB _Doxygen_GRAPHVIZ_BIN_DIRS
+            "$ENV{ProgramFiles}/Graphviz*/bin"
+            "$ENV{ProgramFiles${_x86}}/Graphviz*/bin"
+        )
+        unset(_x86)
+    else()
+        set(_Doxygen_GRAPHVIZ_BIN_DIRS "")
+    endif()
+
     find_program(
         DOXYGEN_DOT_EXECUTABLE
         NAMES dot
@@ -529,7 +535,6 @@ macro(_Doxygen_find_dot)
     endif()
 
     unset(_Doxygen_GRAPHVIZ_BIN_DIRS)
-    unset(_x86)
 endmacro()
 
 #