diff options
| author | ruki <[email protected]> | 2022-07-11 22:38:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-11 22:38:09 +0800 |
| commit | 380591173f252275df68fc33d08404d2ecc7d166 (patch) | |
| tree | 2f0382810702d71f53566f83746954d660a882a8 | |
| parent | 23e109feb0010a0c2c7b55d2e9bf3cab1ed69065 (diff) | |
remove latest for cmake.find_package
| -rw-r--r-- | xmake/modules/package/manager/cmake/find_package.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua index 0d2d5638b..73b10a9ef 100644 --- a/xmake/modules/package/manager/cmake/find_package.lua +++ b/xmake/modules/package/manager/cmake/find_package.lua @@ -42,7 +42,7 @@ 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.require_version then + if opt.require_version and opt.require_version ~= "latest" then requirestr = requirestr .. " " .. opt.require_version end -- use opt.components is for backward compatibility @@ -70,6 +70,7 @@ function _find_package(cmake, name, opt) end end end + print(requirestr) local testname = "test_" .. name cmakefile:print("find_package(%s REQUIRED)", requirestr) cmakefile:print("if(%s_FOUND)", name) |
