summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxq114 <[email protected]>2024-06-16 23:42:06 +0800
committerxq114 <[email protected]>2024-06-16 23:42:06 +0800
commitba03d63bedaab53f77aaacd2550ff32c53e4211d (patch)
treec25d375f7c5fc6e9f46978a9a618574a0905c681
parent0a51973c3c6c3b40e35a6bc15bd7976ae0cd67f7 (diff)
prefer envs.CMAKE_BUILD_TYPE
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index 49a0ec493..6c3a9f194 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -237,7 +237,7 @@ function _find_package(cmake, name, opt)
local vcprojfile = path.join(workdir, testname .. ".vcxproj")
if os.isfile(vcprojfile) then
local vcprojdata = io.readfile(vcprojfile)
- local vs_mode = _cmake_mode(opt.mode or "release")
+ local vs_mode = envs.CMAKE_BUILD_TYPE or _cmake_mode(opt.mode or "release")
vcprojdata = vcprojdata:match("<ItemDefinitionGroup Condition=\"'$%(Configuration%)|$%(Platform%)'=='" .. vs_mode .. "|.->(.-)</ItemDefinitionGroup>")
if vcprojdata then