diff --git a/packages/m/mhook/xmake.lua b/packages/m/mhook/xmake.lua
index 0e6618287..8aa4a30c2 100644
--- a/packages/m/mhook/xmake.lua
+++ b/packages/m/mhook/xmake.lua
@@ -13,6 +13,8 @@ package("mhook")
 
     on_install("windows", function (package)
         local configs = {}
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         import("package.tools.cmake").install(package, configs)
     end)