summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 6745ee5bb..7bf9b8b31 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -426,6 +426,10 @@ function _get_configs_for_generic(package, configs, opt)
if package:is_library() then
envs.BUILD_SHARED_LIBS = package:config("shared") and "ON" or "OFF"
end
+ -- https://cmake.org/cmake/help/latest/variable/CMAKE_LINKER_TYPE.html
+ if package:has_tool("ld", "link") then
+ envs.CMAKE_LINKER_TYPE = "MSVC"
+ end
_fix_zigcc_linker_cmake(package, envs)
_insert_configs_from_envs(configs, envs, opt)
end