From e4862b967101da4020f7d7e652592d20dec7cadb Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 17 Mar 2020 00:41:42 +0800 Subject: install lib for windows/dll --- xmake/actions/install/install.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xmake/actions/install/install.lua b/xmake/actions/install/install.lua index a08364c9a..6a03cfc4c 100644 --- a/xmake/actions/install/install.lua +++ b/xmake/actions/install/install.lua @@ -80,6 +80,16 @@ function _install_library(target) -- copy the target file os.vcp(target:targetfile(), librarydir) + -- copy *.lib for shared/windows (*.dll) target + -- @see https://github.com/xmake-io/xmake/issues/714 + if target:targetkind() == "shared" and is_plat("windows", "mingw") then + local targetfile = target:targetfile() + local targetfile_lib = path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib") + if os.isfile(targetfile_lib) then + os.vcp(targetfile_lib, librarydir) + end + end + -- copy headers to the include directory local srcheaders, dstheaders = target:headerfiles(includedir) if srcheaders and dstheaders then -- cgit v1.3.1