From 8f3d4ec9654ba58a5a098213c2d28c01ecd1649c Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 16 Sep 2021 00:32:13 +0800 Subject: improve mingw installation --- xmake/modules/target/action/install/windows.lua | 2 +- 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) -- cgit v1.3.1