summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/manager/pkgconfig/find_package.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/pkgconfig/find_package.lua b/xmake/modules/package/manager/pkgconfig/find_package.lua
index 792f99c7a..041aa8629 100644
--- a/xmake/modules/package/manager/pkgconfig/find_package.lua
+++ b/xmake/modules/package/manager/pkgconfig/find_package.lua
@@ -20,6 +20,7 @@
-- imports
import("lib.detect.pkgconfig")
+import("private.core.base.is_cross")
import("package.manager.system.find_package", {alias = "find_package_from_system"})
-- find package from the pkg-config package manager
@@ -28,9 +29,10 @@ import("package.manager.system.find_package", {alias = "find_package_from_system
-- @param opt the options, e.g. {verbose = true, version = "1.12.x")
--
function main(name, opt)
-
- -- init options
opt = opt or {}
+ if is_cross(opt.plat, opt.arch) then
+ return
+ end
-- get library info
local libinfo = pkgconfig.libinfo(name, opt)