diff options
| author | ruki <[email protected]> | 2020-12-16 23:56:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-16 23:56:23 +0800 |
| commit | 1392992e8e941f188238c31ca9282bdd2f3d4531 (patch) | |
| tree | 3e280c5ac73bd6438d590e8659a73efdd55fbca7 | |
| parent | c3bec4b1e483f5bcf443cf1a26b3b8bd8cfa2fba (diff) | |
fix some old cached configs
| -rw-r--r-- | xmake/modules/package/manager/conan/install_package.lua | 7 | ||||
| -rw-r--r-- | xmake/rules/qt/deploy/macosx.lua | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua index 8e7561826..cc7721527 100644 --- a/xmake/modules/package/manager/conan/install_package.lua +++ b/xmake/modules/package/manager/conan/install_package.lua @@ -21,6 +21,7 @@ -- imports import("core.base.option") import("core.project.config") +import("core.tool.toolchain") import("core.platform.platform") import("lib.detect.find_tool") import("devel.git") @@ -219,7 +220,11 @@ function main(name, opt) table.insert(argv, "compiler.runtime=" .. opt.vs_runtime) end elseif opt.plat == "iphoneos" then - local target_minver = config.get("target_minver_iphoneos") + local target_minver = nil + local toolchain_xcode = toolchain.load("xcode", {plat = opt.plat, arch = opt.arch}) + if toolchain_xcode then + target_minver = toolchain_xcode:config("target_minver") + end if target_minver and tonumber(target_minver) > 10 and (arch == "armv7" or arch == "armv7s" or arch == "x86") then target_minver = "10" -- iOS 10 is the maximum deployment target for 32-bit targets end diff --git a/xmake/rules/qt/deploy/macosx.lua b/xmake/rules/qt/deploy/macosx.lua index 09d470189..67b9193d3 100644 --- a/xmake/rules/qt/deploy/macosx.lua +++ b/xmake/rules/qt/deploy/macosx.lua @@ -23,12 +23,21 @@ import("core.theme.theme") import("core.base.option") import("core.project.config") import("core.project.depend") +import("core.tool.toolchain") import("lib.detect.find_path") import("private.utils.progress") -- save Info.plist function _save_info_plist(target, info_plist_file) + -- get target minver + local target_minver = nil + local toolchain_xcode = toolchain.load("xcode", {plat = target:plat(), arch = target:arch()}) + if toolchain_xcode then + target_minver = toolchain_xcode:config("target_minver") + end + + -- generate info.plist local name = target:basename() io.writefile(info_plist_file, string.format([[<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> @@ -59,7 +68,7 @@ function _save_info_plist(target, info_plist_file) <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> -</plist>]], name, name, name, name, get_config("target_minver_macosx") or (macos.version():major() .. "." .. macos.version():minor()))) +</plist>]], name, name, name, name, target_minver or (macos.version():major() .. "." .. macos.version():minor()))) end -- deploy application package for macosx |
