diff options
| author | ruki <[email protected]> | 2015-12-08 18:30:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-08 18:30:18 +0800 |
| commit | 119f3d4d895419eb905c1637b88c295f3144ceab (patch) | |
| tree | 3daf1d5ece7fe41e3d17bc0cd58a1ed745a61ef9 | |
| parent | 733401857a8de8678ae678f8fcf15351acfb2210 (diff) | |
fix target_minver
| -rw-r--r-- | xmake/scripts/platform/iphoneos/iphoneos.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphoneos/prober.lua | 20 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/iphonesimulator.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/prober.lua | 20 | ||||
| -rw-r--r-- | xmake/scripts/platform/macosx/macosx.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/platform/macosx/prober.lua | 20 |
6 files changed, 63 insertions, 3 deletions
diff --git a/xmake/scripts/platform/iphoneos/iphoneos.lua b/xmake/scripts/platform/iphoneos/iphoneos.lua index c860983da..394e47037 100644 --- a/xmake/scripts/platform/iphoneos/iphoneos.lua +++ b/xmake/scripts/platform/iphoneos/iphoneos.lua @@ -108,7 +108,7 @@ function iphoneos.menu(action) , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } - , {nil, "target_minver", "kv", "7.0", "The Target Minimal Version" } + , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } , {} , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } diff --git a/xmake/scripts/platform/iphoneos/prober.lua b/xmake/scripts/platform/iphoneos/prober.lua index ac2e45838..f63f8ea5c 100644 --- a/xmake/scripts/platform/iphoneos/prober.lua +++ b/xmake/scripts/platform/iphoneos/prober.lua @@ -140,6 +140,25 @@ function prober._probe_xcode_sdkver(configs) return true end +-- probe the target minimal version +function prober._probe_target_minver(configs) + + -- get the target minimal version + local target_minver = configs.get("target_minver") + + -- ok? + if target_minver then return true end + + -- init the default target minimal version + configs.set("target_minver", "7.0") + + -- trace + utils.verbose("checking for the target minimal version ... %s", configs.get("target_minver")) + + -- ok + return true +end + -- probe the make function prober._probe_make(configs) @@ -251,6 +270,7 @@ function prober.config() return utils.call( { prober._probe_arch , prober._probe_xcode , prober._probe_xcode_sdkver + , prober._probe_target_minver , prober._probe_make , prober._probe_ccache , prober._probe_toolchains} diff --git a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua index 1e3b39b94..bb6cd6bfd 100644 --- a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua +++ b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua @@ -105,7 +105,7 @@ function iphonesimulator.menu(action) , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } - , {nil, "target_minver", "kv", "7.0", "The Target Minimal Version" } + , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } , {} , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } diff --git a/xmake/scripts/platform/iphonesimulator/prober.lua b/xmake/scripts/platform/iphonesimulator/prober.lua index 72671ecfa..90b64cb4f 100644 --- a/xmake/scripts/platform/iphonesimulator/prober.lua +++ b/xmake/scripts/platform/iphonesimulator/prober.lua @@ -140,6 +140,25 @@ function prober._probe_xcode_sdkver(configs) return true end +-- probe the target minimal version +function prober._probe_target_minver(configs) + + -- get the target minimal version + local target_minver = configs.get("target_minver") + + -- ok? + if target_minver then return true end + + -- init the default target minimal version + configs.set("target_minver", "7.0") + + -- trace + utils.verbose("checking for the target minimal version ... %s", configs.get("target_minver")) + + -- ok + return true +end + -- probe the make function prober._probe_make(configs) @@ -250,6 +269,7 @@ function prober.config() return utils.call( { prober._probe_arch , prober._probe_xcode , prober._probe_xcode_sdkver + , prober._probe_target_minver , prober._probe_make , prober._probe_ccache , prober._probe_toolchains} diff --git a/xmake/scripts/platform/macosx/macosx.lua b/xmake/scripts/platform/macosx/macosx.lua index 12844e29a..6174f663d 100644 --- a/xmake/scripts/platform/macosx/macosx.lua +++ b/xmake/scripts/platform/macosx/macosx.lua @@ -110,7 +110,7 @@ function macosx.menu(action) , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } - , {nil, "target_minver", "kv", "10.9", "The Target Minimal Version" } + , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } , } -- init global option menu diff --git a/xmake/scripts/platform/macosx/prober.lua b/xmake/scripts/platform/macosx/prober.lua index cc4ac3dfb..d7f031c12 100644 --- a/xmake/scripts/platform/macosx/prober.lua +++ b/xmake/scripts/platform/macosx/prober.lua @@ -140,6 +140,25 @@ function prober._probe_xcode_sdkver(configs) return true end +-- probe the target minimal version +function prober._probe_target_minver(configs) + + -- get the target minimal version + local target_minver = configs.get("target_minver") + + -- ok? + if target_minver then return true end + + -- init the default target minimal version + configs.set("target_minver", "10.9") + + -- trace + utils.verbose("checking for the target minimal version ... %s", configs.get("target_minver")) + + -- ok + return true +end + -- probe the make function prober._probe_make(configs) @@ -250,6 +269,7 @@ function prober.config() return utils.call( { prober._probe_arch , prober._probe_xcode , prober._probe_xcode_sdkver + , prober._probe_target_minver , prober._probe_make , prober._probe_ccache , prober._probe_toolchains} |
