summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua2
-rw-r--r--xmake/modules/package/tools/xmake.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 041c240b1..4c3f58def 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -698,7 +698,7 @@ function _get_configs(package, configs, opt)
_get_configs_for_android(package, configs, opt)
elseif package:is_plat("iphoneos", "watchos") or
-- for cross-compilation on macOS, @see https://github.com/xmake-io/xmake/issues/2804
- (package:is_plat("macosx") and not package:is_arch(os.subarch())) then
+ (package:is_plat("macosx") and (get_config("appledev") or not package:is_arch(os.subarch()))) then
_get_configs_for_appleos(package, configs, opt)
elseif package:is_plat("mingw") then
_get_configs_for_mingw(package, configs, opt)
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index 6e40e40be..528ad4985 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -224,7 +224,7 @@ function _get_configs(package, configs, opt)
_get_configs_for_android(package, configs, opt)
elseif package:is_plat("iphoneos", "watchos", "appletvos") or
-- for cross-compilation on macOS, @see https://github.com/xmake-io/xmake/issues/2804
- (package:is_plat("macosx") and not package:is_arch(os.subarch())) then
+ (package:is_plat("macosx") and (get_config("appledev") or not package:is_arch(os.subarch()))) then
_get_configs_for_appleos(package, configs, opt)
elseif package:is_plat("mingw") then
_get_configs_for_mingw(package, configs, opt)