summaryrefslogtreecommitdiff
path: root/xmake/modules/package/manager
diff options
context:
space:
mode:
authorRichardYCJ <[email protected]>2023-03-11 10:44:32 +0800
committerRichardYCJ <[email protected]>2023-03-11 10:44:32 +0800
commita44858347dea6e083791663f462bf90a1878a18a (patch)
tree88b372cc0b94ccfdb28a1559f7a91d4680495760 /xmake/modules/package/manager
parent001e4781aaaea799f53a4ab76903ba3930ad1b24 (diff)
Revert "fix cmake::find_package envs set to nil"
This reverts commit 000dc3a8df6d3316b16f03f32611597d9c30a2d4.
Diffstat (limited to 'xmake/modules/package/manager')
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index a279ca731..e6bfcaafb 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -106,12 +106,12 @@ function _find_package(cmake, name, opt)
cmakefile:close()
-- run cmake
- local envs = configs.envs or opt.envs or {}
+ local envs = configs.envs or opt.envs
-- decide whether to enable debug build type
if (not envs.CMAKE_BUILD_TYPE and opt.mode == "debug") then
envs.CMAKE_BUILD_TYPE = "Debug"
end
- os.vrunv(cmake.program, {workdir}, {curdir = workdir, envs = envs})
+ try {function() return os.vrunv(cmake.program, {workdir}, {curdir = workdir, envs = envs}) end}
-- pares defines and includedirs for macosx/linux
local links