Quellcode durchsuchen

doxygen: fix the build on windows. (#2732)

* doxygen: fix the build on windows.

See https://github.com/xmake-io/xmake-repo/issues/2727 for more info.

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
Yipeng Sun vor 1 Jahr
Ursprung
Commit
b552dffcf0
1 geänderte Dateien mit 10 neuen und 1 gelöschten Zeilen
  1. 10 1
      packages/d/doxygen/xmake.lua

+ 10 - 1
packages/d/doxygen/xmake.lua

@@ -32,8 +32,17 @@ package("doxygen")
     end)
 
     on_install("@windows", "@macosx", "@linux", function (package)
+        local configs = {}
+        local cxflags = {}
+        if package:is_plat("windows") then
+            -- these 2 flags are required to make doxygen compile on windows
+            table.insert(cxflags, "/utf-8")
+            table.insert(cxflags, "/DGHC_WITH_EXCEPTIONS")
+            table.insert(cxflags, "/EHsc")  -- to reduce warnings
+        end
+
         os.rm("templates/*/PaxHeader")
-        import("package.tools.cmake").install(package)
+        import("package.tools.cmake").install(package, configs, {cxflags = cxflags})
     end)
 
     on_test(function (package)