From 33f1ec40fdfdcba4e2ae1e40d0050868ca4dca76 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 4 Sep 2023 23:51:00 +0800 Subject: get librarydeps with private --- xmake/modules/package/tools/cmake.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xmake/modules/package/tools/cmake.lua') diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 2174508e2..c0076a83c 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -739,11 +739,13 @@ function buildenvs(package, opt) end -- add environments for cmake/find_packages + -- and we need also find them from private libraries, + -- @see https://github.com/xmake-io/xmake-repo/pull/2553 local CMAKE_LIBRARY_PATH = {} local CMAKE_INCLUDE_PATH = {} local CMAKE_PREFIX_PATH = {} local PKG_CONFIG_PATH = {} - for _, dep in ipairs(package:librarydeps()) do + for _, dep in ipairs(package:librarydeps({private = true})) do if dep:is_system() then local fetchinfo = dep:fetch() if fetchinfo then -- cgit v1.3.1