add libredwg package (#3494)

* add libredwg package

* update desc

* upd

* upd

* adopt CR

* Revert "adopt CR"

This reverts commit 9511eaec12.

* upd

* Update xmake.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/3495/head
c8ef 9 months ago committed by GitHub
parent 3901e40274
commit 4138195f7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      packages/l/libredwg/xmake.lua

@ -0,0 +1,19 @@
package("libredwg")
set_homepage("https://github.com/LibreDWG/libredwg")
set_description("A library to allow reading data from a DWG file.")
add_urls("https://github.com/LibreDWG/libredwg.git")
add_versions("0.13.3", "97c7225596c17430b82fd0161e7eff6beb5b1034")
add_deps("cmake")
on_install("windows", "linux", function (package)
local configs = {"-DBUILD_TESTING=OFF", "-DDISABLE_WERROR=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package: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)
end)
on_test(function (package)
assert(package:has_cfuncs("dwg_rgb_palette_index", {includes = "dwg.h"}))
end)
Loading…
Cancel
Save