Explorar el Código

Fix missing `numpy` when linking boost.python and linking wrong library name when turn debug on. (#2262)

Co-authored-by: Garfield Kuang <[email protected]>
garfieldkwong hace 2 años
padre
commit
1164514e92
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      packages/b/boost/xmake.lua

+ 6 - 1
packages/b/boost/xmake.lua

@@ -84,7 +84,7 @@ package("boost")
             else
                 linkname = "boost_" .. libname
             end
-            if libname == "python" then
+            if libname == "python" or libname == "numpy" then
                 linkname = linkname .. package:config("pyver"):gsub("%p+", "")
             end
             if package:config("multi") then
@@ -103,11 +103,16 @@ package("boost")
                 elseif vs_runtime == "MDd" then
                     linkname = linkname .. "-gd"
                 end
+            else
+                if package:debug() then
+                    linkname = linkname .. "-d"
+                end
             end
             return linkname
         end
         -- we need the fixed link order
         local sublibs = {log = {"log_setup", "log"},
+                         python = {"python", "numpy"},
                          stacktrace = {"stacktrace_backtrace", "stacktrace_basic"}}
         for _, libname in ipairs(libnames) do
             local libs = sublibs[libname]