diff options
| author | ruki <[email protected]> | 2018-10-18 11:47:12 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-18 11:47:12 +0800 |
| commit | c012b45bf267186996f18aaaca64b2705914ca45 (patch) | |
| tree | ad2497185297106c3cb5a329dc2cf40a97b6e873 | |
| parent | d81ec1fbea02cac09cee3fa04ac2d8876425eb0b (diff) | |
| parent | 69efc61859543613abc7ec553029852cd5693d17 (diff) | |
Merge pull request #235 from rivy/rev.find_vswhere
improve find_vswhere (allow use of check/command options)
| -rw-r--r-- | xmake/modules/detect/tools/find_vswhere.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/modules/detect/tools/find_vswhere.lua b/xmake/modules/detect/tools/find_vswhere.lua index cbf5efc2d..3a53e7226 100644 --- a/xmake/modules/detect/tools/find_vswhere.lua +++ b/xmake/modules/detect/tools/find_vswhere.lua @@ -15,7 +15,7 @@ -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. --- +-- -- Copyright (C) 2015 - 2018, TBOOX Open Source Group. -- -- @author ruki @@ -26,33 +26,33 @@ import("lib.detect.find_program") import("lib.detect.find_programver") --- find vswhere +-- find vswhere -- -- @param opt the argument options, .e.g {version = true, program = "c:\xxx\vswhere.exe"} -- -- @return program, version -- --- @code +-- @code -- -- local vswhere = find_vswhere() -- local vswhere, version = find_vswhere({version = true}) -- local vswhere, version = find_vswhere({version = true, program = "c:\xxx\vswhere.exe"}) --- +-- -- @endcode -- function main(opt) -- not on windows? if not is_host("windows") then - return + return end -- init options opt = opt or {} - + -- find program - opt.check = "-?" - opt.command = "-?" + opt.check = opt.check or "-?" + opt.command = opt.command or "-?" opt.pathes = opt.pathes or { "$(env ProgramFiles%(x86%))\\Microsoft Visual Studio\\Installer", |
