summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-28 00:20:08 +0800
committerruki <[email protected]>2022-05-28 00:20:08 +0800
commit128c344d7c610804ae9229d371c21169e3027c48 (patch)
treeb636d89339bc3415786cd0ffacb77a60f1db92be
parentbbab8055d456fe57d17d424627270d987194d1c5 (diff)
fix cmake/find_package
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index 950015d18..0d2d5638b 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -42,8 +42,8 @@ function _find_package(cmake, name, opt)
-- e.g. OpenCV 4.1.1, Boost COMPONENTS regex system
local requirestr = name
local configs = opt.configs or {}
- if opt.required_version then
- requirestr = requirestr .. " " .. opt.required_version
+ if opt.require_version then
+ requirestr = requirestr .. " " .. opt.require_version
end
-- use opt.components is for backward compatibility
local components = configs.components or opt.components
@@ -254,7 +254,7 @@ end
-- e.g.
--
-- find_package("cmake::ZLIB")
--- find_package("cmake::OpenCV", {required_version = "4.1.1"})
+-- find_package("cmake::OpenCV", {require_version = "4.1.1"})
-- find_package("cmake::Boost", {configs = {components = {"regex", "system"}, presets = {Boost_USE_STATIC_LIB = true}}})
-- find_package("cmake::Foo", {configs = {moduledirs = "xxx"}})
--
@@ -266,7 +266,7 @@ end
-- add_requires("cmake::Foo", {configs = {moduledirs = "xxx"}})
--
-- @param name the package name
--- @param opt the options, e.g. {verbose = true, required_version = "1.0",
+-- @param opt the options, e.g. {verbose = true, require_version = "1.0",
-- configs = {
-- components = {"regex", "system"},
-- moduledirs = "xxx",