Skip to content

Commit

Permalink
jsoncpp: fix ninja build
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing committed Nov 11, 2024
1 parent 28c118b commit 87daad2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/j/jsoncpp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ package("jsoncpp")
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
import("package.tools.cmake").install(package, configs)

if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.vcp(path.join(package:buildir(), "**.pdb"), dir)
end
end)

on_test(function(package)
Expand Down

0 comments on commit 87daad2

Please sign in to comment.