summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 4c6898bd7..ad87294b0 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -435,7 +435,7 @@ function _get_configs_for_appleos(package, configs, opt)
if package:is_arch("x86_64", "i386") then
envs.CMAKE_OSX_SYSROOT = "iphonesimulator"
end
- elseif _is_cross_compilation() then
+ elseif package:is_cross() then
envs.CMAKE_SYSTEM_NAME = "Darwin"
envs.CMAKE_SYSTEM_PROCESSOR = package:targetarch()
end
@@ -554,7 +554,7 @@ function _get_configs_for_cross(package, configs, opt)
envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt)
-- we don't need to set it as cross compilation if we just pass toolchain
-- https://github.com/xmake-io/xmake/issues/2170
- if _is_cross_compilation() then
+ if package:is_cross() then
local system_name = package:targetos() or "Linux"
if system_name == "linux" then
system_name = "Linux"
@@ -630,7 +630,7 @@ function _get_configs_for_host_toolchain(package, configs, opt)
envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt)
-- we don't need to set it as cross compilation if we just pass toolchain
-- https://github.com/xmake-io/xmake/issues/2170
- if _is_cross_compilation() then
+ if package:is_cross() then
envs.CMAKE_SYSTEM_NAME = "Linux"
else
if package:config("pic") ~= false then