From de06bfc4e74ee23c6d7d599cd3bf4e7e1072f0b1 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 23 Oct 2021 00:45:55 +0800 Subject: add include and lib envs for xrepo env --- xmake/modules/private/xrepo/action/env.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua index 742d30d12..0a6ccb7ed 100644 --- a/xmake/modules/private/xrepo/action/env.lua +++ b/xmake/modules/private/xrepo/action/env.lua @@ -227,6 +227,13 @@ function _package_addenvs(envs, instance) _addenvs(envs, "ACLOCAL_PATH", aclocal) end _addenvs(envs, "CMAKE_PREFIX_PATH", installdir) + if instance:is_plat("windows") then + _addenvs(envs, "INCLUDE", path.join(installdir, "include")) + _addenvs(envs, "LIBPATH", path.join(installdir, "lib")) + else + _addenvs(envs, "CPATH", path.join(installdir, "include")) + _addenvs(envs, "LIBRARY_PATH", path.join(installdir, "lib")) + end end end -- cgit v1.3.1