Skip to content

Commit

Permalink
add os.version for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Nov 7, 2019
1 parent a6e8c02 commit 22d8164
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xmake/modules/package/manager/conan/find_package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function _conan_get_arch(opt)
x86 = "x86",
armv7 = "armv7",
armv7s = "armv7s",
arm64 = "armv8",
["arm64-v8a"] = "armv8",
mips = "mips",
mips64 = "mips64"}
Expand Down Expand Up @@ -72,7 +73,7 @@ function main(name, opt)
local plat = _conan_get_plat(opt)
local arch = _conan_get_arch(opt)
local mode = _conan_get_mode(opt)
if not plat and not arch and not mode then
if not plat or not arch or not mode then
return
end

Expand Down
13 changes: 13 additions & 0 deletions xmake/modules/package/manager/conan/install_package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function main(name, opt)
x86 = "x86",
armv7 = "armv7",
armv7s = "armv7s",
arm64 = "armv8", -- for iphoneos
["arm64-v8a"] = "armv8",
mips = "mips",
mips64 = "mips64"}
Expand Down Expand Up @@ -188,6 +189,18 @@ function main(name, opt)
table.insert(argv, "-s")
table.insert(argv, "compiler.runtime=" .. opt.vs_runtime)
end
elseif opt.plat == "iphoneos" then
-- TODO
local target_minver = config.get("target_minver")
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
if target_minver then
table.insert(argv, "-s")
table.insert(argv, "os.version=" .. target_minver)
end
elseif opt.plat == "android" then
-- TODO
end

-- set custom settings
Expand Down

0 comments on commit 22d8164

Please sign in to comment.