|
@@ -11,7 +11,9 @@ package("tbox")
|
|
add_versions("v1.6.2", "5236090b80374b812c136c7fe6b8c694418cbfc9c0a820ec2ba35ff553078c7b")
|
|
add_versions("v1.6.2", "5236090b80374b812c136c7fe6b8c694418cbfc9c0a820ec2ba35ff553078c7b")
|
|
add_versions("v1.6.3", "bc5a957cdb1610c19f0cf94497ad114a0e01fd7d569777e9cb2133c513ef6baa")
|
|
add_versions("v1.6.3", "bc5a957cdb1610c19f0cf94497ad114a0e01fd7d569777e9cb2133c513ef6baa")
|
|
|
|
|
|
- add_configs("micro", {description = "Compile micro core library for the embed system.", default = false, type = "boolean"})
|
|
|
|
|
|
+ add_configs("micro", {description = "Compile micro core library for the embed system.", default = false, type = "boolean"})
|
|
|
|
+ add_configs("float", {description = "Enable or disable the float type.", default = true, type = "boolean"})
|
|
|
|
+ add_configs("force-utf8", {description = "Forcely regard all tb_char* as utf-8.", default = false, type = "boolean"})
|
|
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
|
|
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
|
|
add_configs(name, {description = "Enable the " .. name .. " module.", default = false, type = "boolean"})
|
|
add_configs(name, {description = "Enable the " .. name .. " module.", default = false, type = "boolean"})
|
|
end
|
|
end
|
|
@@ -25,6 +27,8 @@ package("tbox")
|
|
add_syslinks("ws2_32", "pthread")
|
|
add_syslinks("ws2_32", "pthread")
|
|
elseif not is_plat("android") then
|
|
elseif not is_plat("android") then
|
|
add_syslinks("pthread")
|
|
add_syslinks("pthread")
|
|
|
|
+ elseif is_plat("macosx", "iphoneos") then
|
|
|
|
+ add_frameworks("Foundation")
|
|
end
|
|
end
|
|
|
|
|
|
on_load(function (package)
|
|
on_load(function (package)
|
|
@@ -38,6 +42,12 @@ package("tbox")
|
|
if package:config("micro") then
|
|
if package:config("micro") then
|
|
config.micro = true
|
|
config.micro = true
|
|
end
|
|
end
|
|
|
|
+ if not package:config("float") then
|
|
|
|
+ config["float"] = false
|
|
|
|
+ end
|
|
|
|
+ if package:config("force-utf8") then
|
|
|
|
+ config["force-utf8"] = true
|
|
|
|
+ end
|
|
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
|
|
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
|
|
if package:config(name) then
|
|
if package:config(name) then
|
|
configs[name] = true
|
|
configs[name] = true
|