diff options
| author | ruki <[email protected]> | 2023-05-31 22:33:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-05-31 22:33:42 +0800 |
| commit | 2c4e281d00f8019a4416d0b8b89eeac4b37a34e5 (patch) | |
| tree | ce0e4bf5d649a1bec038b8c93a6564af81d94290 /xmake/modules/package/manager/pkgconfig/find_package.lua | |
| parent | 853d25d9192c4e2c936b2dbd267342ad5a6766ae (diff) | |
improve to find package from pkg-config #3777
Diffstat (limited to 'xmake/modules/package/manager/pkgconfig/find_package.lua')
| -rw-r--r-- | xmake/modules/package/manager/pkgconfig/find_package.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/pkgconfig/find_package.lua b/xmake/modules/package/manager/pkgconfig/find_package.lua index 543d8920e..792f99c7a 100644 --- a/xmake/modules/package/manager/pkgconfig/find_package.lua +++ b/xmake/modules/package/manager/pkgconfig/find_package.lua @@ -50,9 +50,10 @@ function main(name, opt) end end - -- get result + -- get result, libinfo may be empty body, but it's also valid + -- @see https://github.com/xmake-io/xmake/issues/3777#issuecomment-1568453316 local result = nil - if libinfo.links or libinfo.includedirs then + if libinfo then result = result or {} result.includedirs = libinfo.includedirs result.linkdirs = libinfo.linkdirs |
