diff options
| author | Jérôme Leclercq <[email protected]> | 2024-06-13 13:19:21 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 13:19:21 +0200 |
| commit | b7f944a8d6189f3556070e5487cde61fa20557f2 (patch) | |
| tree | 519525129c69acc288863f71d4284ff727200d8c | |
| parent | a10728372380b7556bf7b10d465cbe08417058c1 (diff) | |
Update cmake.lua
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 6 |
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 |
