diff options
| author | Roy Ivy III <[email protected]> | 2018-10-17 22:23:42 -0500 |
|---|---|---|
| committer | Roy Ivy III <[email protected]> | 2018-10-17 22:25:33 -0500 |
| commit | 69efc61859543613abc7ec553029852cd5693d17 (patch) | |
| tree | 86ee826628cecacaf4f36924ad9e89bf2b3812cd | |
| parent | 3ae8c87c61b28be22e944235e3c4c23ff49d2584 (diff) | |
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", |
