summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-23 00:45:55 +0800
committerruki <[email protected]>2021-10-23 00:45:55 +0800
commitde06bfc4e74ee23c6d7d599cd3bf4e7e1072f0b1 (patch)
tree9ddeecf1569a9ae86c744f73c6e3d9b7843956c1
parent55eaa73edf4b3bace71ec1a71b957c34374442b2 (diff)
add include and lib envs for xrepo env
-rw-r--r--xmake/modules/private/xrepo/action/env.lua7
1 files changed, 7 insertions, 0 deletions
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