Skip to content

Commit 6178b7f

Browse files
committed
fix missing includedirs and some libs to link
1 parent a037e92 commit 6178b7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/o/opencv/xmake.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ package("opencv")
103103
local arch = package:targetarch()
104104
local linkdir = (package:config("shared") and "lib" or "staticlibs")
105105
package:add("linkdirs", path.join("sdk/native", linkdir, package:targetarch()))
106+
package:add("includedirs", "sdk/native/jni/include")
106107
elseif package:version():ge("4.0") then
107108
package:add("includedirs", "include/opencv4")
108109
package:add("linkdirs", "lib", "lib/opencv4/3rdparty")
@@ -243,8 +244,9 @@ package("opencv")
243244
local linkdir = (package:config("shared") and "lib" or "staticlibs")
244245
local libfiles = {}
245246
table.join2(libfiles, os.files(path.join(package:installdir(), "sdk/native", linkdir, package:targetarch(), "lib*.a")))
247+
table.join2(libfiles, os.files(path.join(package:installdir(), "sdk/native/3rdparty/libs", package:targetarch(), "lib*.a")))
246248
for _, f in ipairs(libfiles) do
247-
if f:match("libopencv_.+") then
249+
if f:match("lib.+") then
248250
package:add("links", path.basename(f))
249251
end
250252
end

0 commit comments

Comments
 (0)