summaryrefslogtreecommitdiff
path: root/xmake/modules/package
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package')
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua8
-rw-r--r--xmake/modules/package/tools/autoconf.lua1
2 files changed, 9 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..4c71291d7 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -83,6 +83,14 @@ function _find_package(cmake, name, opt)
cmakefile:print("list(APPEND CMAKE_MODULE_PATH \"%s\")", (moduledir:gsub("\\", "/")))
end
end
+ -- https://github.com/xmake-io/xmake/issues/6296
+ local prefixdirs = configs.prefixdirs or opt.prefixdirs
+ if prefixdirs then
+ for _, prefixdir in ipairs(prefixdirs) do
+ cmakefile:print("list(APPEND CMAKE_PREFIX_PATH \"%s\")", (prefixdir:gsub("\\", "/")))
+ end
+ end
+
-- e.g. set(Boost_USE_STATIC_LIB ON)
local presets = configs.presets or opt.presets
if presets then
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 8d312a76a..821ab759f 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -434,6 +434,7 @@ function buildenvs(package, opt)
if is_host("windows") then
envs.CC = _translate_windows_bin_path(envs.CC)
+ envs.CXX = _translate_windows_bin_path(envs.CXX)
envs.AS = _translate_windows_bin_path(envs.AS)
envs.AR = _translate_windows_bin_path(envs.AR)
envs.LD = _translate_windows_bin_path(envs.LD)