|
@@ -6,6 +6,7 @@ package("lunasvg")
|
|
|
add_urls("https://github.com/sammycage/lunasvg/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/sammycage/lunasvg.git")
|
|
|
|
|
|
+ add_versions("v3.3.0", "06045afc30dbbdd87e219e0f5bc0526214a9d8059087ac67ce9df193a682c4b3")
|
|
|
add_versions("v3.2.0", "073629cf858bceff6fe938370d141ac7c0d21ce40acd4ffe1d56109b84d16e0d")
|
|
|
add_versions("v3.1.0", "2e05791bcc7c30c77efc4fee23557c5c4c9ccd4cf626a3167c0b4a4a316ae2b6")
|
|
|
add_versions("v3.0.1", "39e3f47d4e40f7992d7958123ca1993ff1a02887539af2af1c638da2855a603c")
|
|
@@ -20,8 +21,7 @@ package("lunasvg")
|
|
|
add_includedirs("include", "include/lunasvg")
|
|
|
|
|
|
on_load(function (package)
|
|
|
- local version = package:version()
|
|
|
- if package:gitref() or version:ge("2.4.1") then
|
|
|
+ if package:version() and package:version():ge("2.4.1") then
|
|
|
if not package:config("shared") then
|
|
|
package:add("defines", "LUNASVG_BUILD_STATIC")
|
|
|
end
|
|
@@ -34,16 +34,12 @@ package("lunasvg")
|
|
|
|
|
|
on_install(function (package)
|
|
|
io.replace("CMakeLists.txt", "FetchContent_MakeAvailable(plutovg)", "find_package(plutovg)", {plain = true})
|
|
|
+ io.replace("CMakeLists.txt", "add_subdirectory(plutovg)", "", {plain = true})
|
|
|
|
|
|
- local configs = {"-DLUNASVG_BUILD_EXAMPLES=OFF"}
|
|
|
+ local configs = {"-DLUNASVG_BUILD_EXAMPLES=OFF", "-DUSE_SYSTEM_PLUTOVG=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(), "lunasvg.pdb"), dir)
|
|
|
- end
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|