Skip to content

Commit 9ca1d62

Browse files
committed
update
1 parent bf699b1 commit 9ca1d62

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/o/opencv/xmake.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,12 @@ package("opencv")
241241
import("package.tools.cmake").install(package, configs, {builddir = "bd", shflags = shflags, ldflags = ldflags})
242242

243243
if not package:is_plat("windows", "android") then
244-
io.replace(package:installdir("lib/cmake/opencv4/OpenCVModules.cmake"),
245-
"opencv_wechat_qrcode\n",
246-
"opencv_wechat_qrcode\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Iconv)\n", {plain = true})
244+
local cmakefile = os.files("**/OpenCVModules.cmake")
245+
if cmakefile then
246+
io.replace(package:installdir(cmakefile[1]),
247+
"opencv_wechat_qrcode\n",
248+
"opencv_wechat_qrcode\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Iconv)\n", {plain = true})
249+
end
247250
end
248251
for _, link in ipairs({"opencv_phase_unwrapping", "opencv_surface_matching", "opencv_saliency",
249252
"opencv_wechat_qrcode", "opencv_mcc", "opencv_face",

0 commit comments

Comments
 (0)