|
@@ -1,5 +1,4 @@
|
|
|
package("lunasvg")
|
|
|
-
|
|
|
set_homepage("https://github.com/sammycage/lunasvg")
|
|
|
set_description("LunaSVG - SVG rendering library in C++")
|
|
|
set_license("MIT")
|
|
@@ -10,17 +9,15 @@ package("lunasvg")
|
|
|
add_versions("v2.3.5", "350ff56aa1acdedefe2ad8a4241a9fb8f9b232868adc7bd36dfb3dbdd57e2e93")
|
|
|
|
|
|
add_deps("cmake")
|
|
|
- on_load("windows", function (package)
|
|
|
- if package:config("shared") then
|
|
|
- package:add("defines", "LUNASVG_SHARED")
|
|
|
- end
|
|
|
- end)
|
|
|
|
|
|
- on_install("windows", "macosx", "linux", function (package)
|
|
|
+ on_install(function (package)
|
|
|
local configs = {}
|
|
|
- table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
+ 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:config("shared") then
|
|
|
+ package:add("defines", "LUNASVG_SHARED")
|
|
|
+ end
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|