|
@@ -22,40 +22,33 @@ package("cpptrace")
|
|
|
|
|
|
add_patches("0.5.2", "https://github.com/jeremy-rifkin/cpptrace/commit/599d6abd6cc74e80e8429fc309247be5f7edd5d7.patch", "977e6c17400ff2f85362ca1d6959038fdb5d9e5b402cfdd705b422c566e8e87a")
|
|
|
|
|
|
- if is_plat("windows") then
|
|
|
+ if is_plat("windows", "mingw") then
|
|
|
add_syslinks("dbghelp")
|
|
|
- elseif is_plat("macosx") then
|
|
|
- add_deps("libdwarf")
|
|
|
- elseif is_plat("linux") or is_plat("cross") then
|
|
|
- add_deps("libdwarf")
|
|
|
+ elseif is_plat("linux", "cross") then
|
|
|
add_syslinks("dl")
|
|
|
- elseif is_plat("mingw") then
|
|
|
- add_deps("libdwarf")
|
|
|
- add_syslinks("dbghelp")
|
|
|
end
|
|
|
|
|
|
add_deps("cmake")
|
|
|
+ if not is_plat("windows") then
|
|
|
+ add_deps("libdwarf")
|
|
|
+ end
|
|
|
|
|
|
on_install("linux", "macosx", "windows", "mingw", "cross", function (package)
|
|
|
- io.replace("CMakeLists.txt", "/WX", "", {plain = true})
|
|
|
-
|
|
|
if not package:config("shared") then
|
|
|
package:add("defines", "CPPTRACE_STATIC_DEFINE")
|
|
|
end
|
|
|
|
|
|
+ io.replace("CMakeLists.txt", "/WX", "", {plain = true})
|
|
|
+
|
|
|
local configs = {
|
|
|
"-DBUILD_TESTING=OFF",
|
|
|
"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=ON",
|
|
|
"-DCPPTRACE_USE_EXTERNAL_ZSTD=ON",
|
|
|
+ "-DCPPTRACE_VCPKG=ON",
|
|
|
}
|
|
|
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"))
|
|
|
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.trycp(path.join(package:buildir(), "cpptrace.pdb"), dir)
|
|
|
- end
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|