libusb: Use on_fetch instead of add_extsources to fix a priority issue (#325)

pull/326/head
Jérôme Leclercq 4 years ago committed by GitHub
parent fd300238ea
commit 7d164ba64b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/l/libusb/xmake.lua

@ -22,10 +22,12 @@ package("libusb")
end
-- it will be provided in xmake v2.5.2
if add_extsources then
if is_plat("macosx", "linux") then
add_extsources("pkgconfig::libusb-1.0")
end
if on_fetch then
on_fetch("linux", "macosx", function(package, opt)
if opt.system then
return find_package("pkgconfig::libusb-1.0")
end
end)
end
add_includedirs("include", "include/libusb-1.0")

Loading…
Cancel
Save