Skip to content

Commit

Permalink
Merge pull request #5877 from star-hengxing/pdb
Browse files Browse the repository at this point in the history
Improve copy pdb with cmake & ninja package
  • Loading branch information
waruqi authored Nov 23, 2024
2 parents 2d3b07d + b293043 commit 6227615
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,15 @@ function _get_configs_for_windows(package, configs, opt)
elseif package:has_runtime("MDd") then
table.insert(configs, "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL")
end
if not opt._configs_str:find("CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb")

local pdb_dir = path.unix(path.join(os.curdir(), "pdb"))
if not opt._configs_str:find("CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY", 1, true) then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=" .. pdb_dir)
end
if not opt._configs_str:find("CMAKE_PDB_OUTPUT_DIRECTORY", 1, true) then
table.insert(configs, "-DCMAKE_PDB_OUTPUT_DIRECTORY=" .. pdb_dir)
end

if package:is_cross() then
_get_configs_for_cross(package, configs, opt)
else
Expand Down

0 comments on commit 6227615

Please sign in to comment.