diff options
| author | ruki <[email protected]> | 2020-03-17 00:41:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-16 22:10:14 +0800 |
| commit | e4862b967101da4020f7d7e652592d20dec7cadb (patch) | |
| tree | 7c421cccdd9eb5e06a82cbd69acff7c763bc0b41 | |
| parent | b5f6aee3dc8be12521c05d369eb20fea2622a0c7 (diff) | |
install lib for windows/dll
| -rw-r--r-- | xmake/actions/install/install.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
