diff options
| author | ruki <[email protected]> | 2021-10-12 00:41:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-10-12 00:41:07 +0800 |
| commit | b143a5713590a3f6a64351eee31dd15ee1177228 (patch) | |
| tree | 217acef1b0c2087435c8d35f4e7820015eb33b8f | |
| parent | b76924dfdc305e865244e6fa7460767b5cbbc794 (diff) | |
add envs to cmake/find_package
| -rw-r--r-- | xmake/modules/package/manager/cmake/find_package.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua index a8eb067b3..051486df5 100644 --- a/xmake/modules/package/manager/cmake/find_package.lua +++ b/xmake/modules/package/manager/cmake/find_package.lua @@ -80,7 +80,7 @@ function _find_package(cmake, name, opt) cmakefile:close() -- run cmake - try {function() return os.vrunv(cmake.program, {workdir}, {curdir = workdir}) end} + try {function() return os.vrunv(cmake.program, {workdir}, {curdir = workdir, envs = opt.envs}) end} -- pares defines and includedirs local links @@ -199,7 +199,8 @@ end -- @param opt the options, e.g. {verbose = true, required_version = "1.0", -- components = {"regex", "system"}, -- moduledirs = "xxx", --- presets = {Boost_USE_STATIC_LIB = true}) +-- presets = {Boost_USE_STATIC_LIB = true}, +-- envs = {CMAKE_PREFIX_PATH = "xxx"}) -- function main(name, opt) opt = opt or {} |
