summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-24 22:34:40 +0800
committerruki <[email protected]>2023-03-24 22:34:40 +0800
commit2b26ccfe4deeccdf73d405254bb81becbefc7da8 (patch)
tree45a37fd8e4fd5316ab3dcea4ad8e98acb3a42459 /xmake/core
parentdfa565e29779ca534506e2ee526a4399003585f4 (diff)
improve to find qt6 from qmake6
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/sandbox/modules/import/core/base/semver.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/core/base/semver.lua b/xmake/core/sandbox/modules/import/core/base/semver.lua
index 8d1dfe33a..f842a0a38 100644
--- a/xmake/core/sandbox/modules/import/core/base/semver.lua
+++ b/xmake/core/sandbox/modules/import/core/base/semver.lua
@@ -35,6 +35,11 @@ function sandbox_core_base_semver.new(version)
return result
end
+-- try parsing the given version string to semver instance
+function sandbox_core_base_semver.try_parse(version)
+ return semver.new(version)
+end
+
-- match a valid version from the string
--
-- semver.match('xxx 1.2.3 xxx') => { major = 1, minor = 2, patch = 3, ... }