diff options
| author | ruki <[email protected]> | 2021-09-16 00:32:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-16 00:32:13 +0800 |
| commit | 8f3d4ec9654ba58a5a098213c2d28c01ecd1649c (patch) | |
| tree | 4c455d5f0559f38f8e55ab41283c867f964ca7c7 | |
| parent | 4cc9ef5e230ac3b765d26cdc3b0dd51ece2448e4 (diff) | |
improve mingw installation
| -rw-r--r-- | xmake/modules/target/action/install/windows.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/target/action/uninstall/windows.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/target/action/install/windows.lua b/xmake/modules/target/action/install/windows.lua index 609e87389..87a7413ca 100644 --- a/xmake/modules/target/action/install/windows.lua +++ b/xmake/modules/target/action/install/windows.lua @@ -110,7 +110,7 @@ function install_shared(target, opt) -- @see https://github.com/xmake-io/xmake/issues/714 local targetfile = target:targetfile() local librarydir = path.join(target:installdir(), opt and opt.libdir or "lib") - local targetfile_lib = path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib") + local targetfile_lib = path.join(path.directory(targetfile), path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib")) if os.isfile(targetfile_lib) then os.mkdir(librarydir) os.vcp(targetfile_lib, librarydir) diff --git a/xmake/modules/target/action/uninstall/windows.lua b/xmake/modules/target/action/uninstall/windows.lua index 236b045e3..2915966db 100644 --- a/xmake/modules/target/action/uninstall/windows.lua +++ b/xmake/modules/target/action/uninstall/windows.lua @@ -81,7 +81,7 @@ function uninstall_shared(target, opt) -- @see https://github.com/xmake-io/xmake/issues/714 local targetfile = target:targetfile() local librarydir = path.join(target:installdir(), opt and opt.libdir or "lib") - os.vrm(path.join(librarydir, path.basename(targetfile) .. ".lib")) + os.vrm(path.join(librarydir, path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib"))) -- remove headers from the include directory _uninstall_headers(target, opt) |
