summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-18 00:41:16 +0800
committerruki <[email protected]>2024-01-18 00:41:16 +0800
commit1aba31a040016a11c20159997bfc1c36bf3cbf92 (patch)
treea5dd99ddad28a0bcf84b30e7f1114d59760771e9
parent20ed56c0b7cce5131fffa8265b60de541d976809 (diff)
fix tools.cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 179db1e00..535aed862 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -435,8 +435,8 @@ function _get_configs_for_appleos(package, configs, opt)
envs.CMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "NEVER"
-- avoid install bundle targets
envs.CMAKE_MACOSX_BUNDLE = "NO"
- -- avoids finding host include/library path
- if package:is_cross() then
+ -- avoids finding host include/library path for macOS/arm64 libraries on macOS/x86_64
+ if package:is_plat("macosx") and package:is_cross() then
envs.CMAKE_FIND_USE_CMAKE_SYSTEM_PATH = "0"
envs.CMAKE_FIND_USE_INSTALL_PREFIX = "0"
end