summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-10 22:41:42 +0800
committerruki <[email protected]>2025-04-10 22:41:42 +0800
commit1268cad62854df59e71757a55fddd74ebde6c65f (patch)
treefef0616992e69d04232cd746ebb5970f0f1e4057
parentcf36a2d24b16627ff32f29a5e058e549503784bc (diff)
improve cmake:find_package #6296
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index 6c3a9f194..4b1c390f0 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -81,6 +81,8 @@ function _find_package(cmake, name, opt)
if moduledirs then
for _, moduledir in ipairs(moduledirs) do
cmakefile:print("list(APPEND CMAKE_MODULE_PATH \"%s\")", (moduledir:gsub("\\", "/")))
+ -- https://github.com/xmake-io/xmake/issues/6296
+ cmakefile:print("list(APPEND CMAKE_PREFIX_PATH \"%s\")", (moduledir:gsub("\\", "/")))
end
end
-- e.g. set(Boost_USE_STATIC_LIB ON)