Browse Source

fix pixman and cairo

ruki 4 years ago
parent
commit
445a8dc022
2 changed files with 6 additions and 2 deletions
  1. 3 1
      packages/c/cairo/xmake.lua
  2. 3 1
      packages/p/pixman/xmake.lua

+ 3 - 1
packages/c/cairo/xmake.lua

@@ -22,6 +22,8 @@ package("cairo")
     end
     end
 
 
     on_install("windows", function (package)
     on_install("windows", function (package)
+        import("core.tool.toolchain")
+        local runenvs = toolchain.load("msvc"):runenvs()
         io.gsub("build/Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
         io.gsub("build/Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
         io.gsub("build/Makefile.win32.common", "mkdir %-p", "xmake l mkdir")
         io.gsub("build/Makefile.win32.common", "mkdir %-p", "xmake l mkdir")
         io.gsub("build/Makefile.win32.common", "dirname", "xmake l path.directory")
         io.gsub("build/Makefile.win32.common", "dirname", "xmake l path.directory")
@@ -39,7 +41,7 @@ package("cairo")
         if zlib then
         if zlib then
             io.gsub("build/Makefile.win32.common", "%$%(ZLIB_CFLAGS%)", "-I\"" .. zlib:installdir("include") .. "\"")
             io.gsub("build/Makefile.win32.common", "%$%(ZLIB_CFLAGS%)", "-I\"" .. zlib:installdir("include") .. "\"")
         end
         end
-        os.vrunv("make", {"-f", "Makefile.win32", "CFG=" .. (package:debug() and "debug" or "release")})
+        os.vrunv("make", {"-f", "Makefile.win32", "CFG=" .. (package:debug() and "debug" or "release")}, {envs = runenvs})
         os.cp("src/*.h", package:installdir("include/cairo"))
         os.cp("src/*.h", package:installdir("include/cairo"))
         os.cp("src/**.lib", package:installdir("lib"))
         os.cp("src/**.lib", package:installdir("lib"))
     end)
     end)

+ 3 - 1
packages/p/pixman/xmake.lua

@@ -14,8 +14,10 @@ package("pixman")
     add_includedirs("include/pixman-1")
     add_includedirs("include/pixman-1")
 
 
     on_install("windows", function (package)
     on_install("windows", function (package)
+        import("core.tool.toolchain")
+        local runenvs = toolchain.load("msvc"):runenvs()
         io.gsub("Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
         io.gsub("Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
-        os.vrun("make -f Makefile.win32 pixman MMX=off")
+        os.vrunv("make", {"-f", "Makefile.win32", "pixman", "MMX=off"}, {envs = runenvs})
         os.cp("pixman/*.h", package:installdir("include/pixman-1"))
         os.cp("pixman/*.h", package:installdir("include/pixman-1"))
         os.cp("pixman/release/*.lib", package:installdir("lib"))
         os.cp("pixman/release/*.lib", package:installdir("lib"))
     end)
     end)