summaryrefslogtreecommitdiff
path: root/xmake/modules/package
diff options
context:
space:
mode:
authorruki <[email protected]>2024-11-20 10:35:27 +0800
committerGitHub <[email protected]>2024-11-20 10:35:27 +0800
commit6f2dc65a267c11c9dbe016e536fd8c756042884a (patch)
treec780783f6f485e736f39ed078fce08c4e1c52457 /xmake/modules/package
parent959106bc784e0a8c218c331970afc25bed52e9c6 (diff)
parent22e37a1f4e93e58c08d2cffa5e79a6dc1e6588b0 (diff)
Merge pull request #5823 from star-hengxing/msvc-build-tools
Support custom vc build tools
Diffstat (limited to 'xmake/modules/package')
-rw-r--r--xmake/modules/package/tools/cmake.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 7db5b3441..2618246b6 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -474,7 +474,11 @@ function _get_configs_for_windows(package, configs, opt)
if not opt._configs_str:find("CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb")
end
- _get_configs_for_generic(package, configs, opt)
+ if package:is_cross() then
+ _get_configs_for_cross(package, configs, opt)
+ else
+ _get_configs_for_generic(package, configs, opt)
+ end
end
-- get configs for android
@@ -663,6 +667,8 @@ function _get_configs_for_cross(package, configs, opt)
local system_name = package:targetos() or "Linux"
if system_name == "linux" then
system_name = "Linux"
+ elseif system_name == "windows" then
+ system_name = "Windows"
end
envs.CMAKE_SYSTEM_NAME = system_name
end