diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-12 16:31:47 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-12 16:31:47 -0300 |
commit | a208f73967ad45c498c57e31ca27d29a48c10603 (patch) | |
tree | d026890137f5a0781e68b3732f2bd8b9b5e2ec0b | |
parent | 238ba6b21cfcb1af56f1e70dd50de201fc3482a7 (diff) | |
download | luarocks-a208f73967ad45c498c57e31ca27d29a48c10603.tar.gz luarocks-a208f73967ad45c498c57e31ca27d29a48c10603.tar.bz2 luarocks-a208f73967ad45c498c57e31ca27d29a48c10603.zip |
macos: use XCode SDK path by default
-rw-r--r-- | src/luarocks/core/cfg.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index 9122c877..043707f5 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -480,6 +480,11 @@ local function make_defaults(lua_version, target_cpu, platforms, home) | |||
480 | defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" | 480 | defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" |
481 | defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" | 481 | defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" |
482 | defaults.web_browser = "open" | 482 | defaults.web_browser = "open" |
483 | |||
484 | local sdk_path = util.popen_read("xcrun --show-sdk-path 2>/dev/null") | ||
485 | if sdk_path then | ||
486 | table.insert(defaults.external_deps_dirs, sdk_path .. "/usr") | ||
487 | end | ||
483 | end | 488 | end |
484 | 489 | ||
485 | if platforms.linux then | 490 | if platforms.linux then |