summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-10-17 22:57:24 +0800
committerruki <[email protected]>2018-10-17 11:44:27 +0800
commit3ae8c87c61b28be22e944235e3c4c23ff49d2584 (patch)
tree208cc832299e7930c32805a55bf33e2191b1fc14
parent35ac60365af7611caa7dfb3bbf1f517bf56bdc0b (diff)
update core/xmake.lua
-rw-r--r--core/src/tbox/src/tbox/xmake.lua38
-rw-r--r--core/src/tbox/src/xmake.lua6
-rw-r--r--core/src/tbox/xmake.lua4
-rw-r--r--core/src/xmake/xmake.lua2
-rw-r--r--core/xmake.lua2
5 files changed, 26 insertions, 26 deletions
diff --git a/core/src/tbox/src/tbox/xmake.lua b/core/src/tbox/src/tbox/xmake.lua
index 1ad2483c0..961e27365 100644
--- a/core/src/tbox/src/tbox/xmake.lua
+++ b/core/src/tbox/src/tbox/xmake.lua
@@ -51,16 +51,16 @@ target("tbox")
add_files("platform/*.c|context.c|exception.c", "platform/impl/*.c")
-- add the source files for the float type
- if is_option("float") then add_files("libm/*.c") end
+ if has_config("float") then add_files("libm/*.c") end
-- add the source files for the xml module
- if is_option("xml") then add_files("xml/**.c") end
+ if has_config("xml") then add_files("xml/**.c") end
-- add the source files for the regex module
- if is_option("regex") then add_files("regex/*.c") end
+ if has_config("regex") then add_files("regex/*.c") end
-- add the source files for the hash module
- if is_option("hash") then
+ if has_config("hash") then
add_files("hash/*.c")
if not is_plat("windows") then
add_files("hash/arch/crc32.S")
@@ -68,18 +68,18 @@ target("tbox")
end
-- add the source files for the asio module
- if is_option("deprecated") then
+ if has_config("deprecated") then
add_files("asio/deprecated/*.c|ssl.c")
add_files("stream/deprecated/**async_**.c")
add_files("stream/deprecated/transfer_pool.c")
add_files("platform/deprecated/aicp.c")
add_files("platform/deprecated/aioo.c")
add_files("platform/deprecated/aiop.c")
- if is_option("openssl", "polarssl", "mbedtls") then add_files("asio/deprecated/ssl.c") end
+ if has_config("openssl", "polarssl", "mbedtls") then add_files("asio/deprecated/ssl.c") end
end
-- add the source files for the coroutine module
- if is_option("coroutine") then
+ if has_config("coroutine") then
add_files("platform/context.c")
if is_plat("windows") then
add_files("platform/arch/$(arch)/context.asm")
@@ -90,16 +90,16 @@ target("tbox")
end
-- add the source files for the exception module
- if is_option("exception") then
+ if has_config("exception") then
add_files("platform/exception.c")
end
-- add the source files for the object module
- if is_option("object") then
+ if has_config("object") then
add_files("object/**.c|**/xml.c|**/xplist.c")
add_files("utils/option.c")
add_files("container/element/obj.c")
- if is_option("xml") then
+ if has_config("xml") then
add_files("object/impl/reader/xml.c")
add_files("object/impl/reader/xplist.c")
add_files("object/impl/writer/xml.c")
@@ -108,16 +108,16 @@ target("tbox")
end
-- add the source files for the charset module
- if is_option("charset") then
+ if has_config("charset") then
add_files("charset/**.c")
add_files("stream/impl/filter/charset.c")
end
-- add the source files for the zip module
- if is_option("zip") then
+ if has_config("zip") then
add_files("zip/**.c|gzip.c|zlib.c|zlibraw.c|lzsw.c")
add_files("stream/impl/filter/zip.c")
- if is_option("zlib") then
+ if has_config("zlib") then
add_files("zip/gzip.c")
add_files("zip/zlib.c")
add_files("zip/zlibraw.c")
@@ -125,16 +125,16 @@ target("tbox")
end
-- add the source files for the database module
- if is_option("database") then
+ if has_config("database") then
add_files("database/*.c")
- if is_option("mysql") then add_files("database/impl/mysql.c") end
- if is_option("sqlite3") then add_files("database/impl/sqlite3.c") end
+ if has_config("mysql") then add_files("database/impl/mysql.c") end
+ if has_config("sqlite3") then add_files("database/impl/sqlite3.c") end
end
-- add the source files for the ssl package
- if is_option("mbedtls") then add_files("network/impl/ssl/mbedtls.c")
- elseif is_option("polarssl") then add_files("network/impl/ssl/polarssl.c")
- elseif is_option("openssl") then add_files("network/impl/ssl/openssl.c") end
+ if has_config("mbedtls") then add_files("network/impl/ssl/mbedtls.c")
+ elseif has_config("polarssl") then add_files("network/impl/ssl/polarssl.c")
+ elseif has_config("openssl") then add_files("network/impl/ssl/openssl.c") end
-- add the source for the windows
if is_os("windows") then
diff --git a/core/src/tbox/src/xmake.lua b/core/src/tbox/src/xmake.lua
index 3c8821167..93957f5d9 100644
--- a/core/src/tbox/src/xmake.lua
+++ b/core/src/tbox/src/xmake.lua
@@ -219,7 +219,7 @@ function check_interfaces()
end
-- include project directories
-includes(format("tbox/%s.lua", ifelse(is_option("micro"), "micro", "xmake")))
-if is_option("demo") then
- includes(format("demo/%s.lua", ifelse(is_option("micro"), "micro", "xmake")))
+includes(format("tbox/%s.lua", ifelse(has_config("micro"), "micro", "xmake")))
+if has_config("demo") then
+ includes(format("demo/%s.lua", ifelse(has_config("micro"), "micro", "xmake")))
end
diff --git a/core/src/tbox/xmake.lua b/core/src/tbox/xmake.lua
index 9f057b294..91730628c 100644
--- a/core/src/tbox/xmake.lua
+++ b/core/src/tbox/xmake.lua
@@ -74,7 +74,7 @@ if is_mode("release", "profile") then
end
-- small or micro?
- if is_option("small", "micro") then
+ if has_config("small", "micro") then
-- enable smallest optimization
set_optimize("smallest")
@@ -85,7 +85,7 @@ if is_mode("release", "profile") then
end
-- small or micro?
-if is_option("small", "micro") then
+if has_config("small", "micro") then
-- add defines for small
add_defines("__tb_small__")
diff --git a/core/src/xmake/xmake.lua b/core/src/xmake/xmake.lua
index 7e1f55e95..dfbfe09bd 100644
--- a/core/src/xmake/xmake.lua
+++ b/core/src/xmake/xmake.lua
@@ -30,7 +30,7 @@ target("xmake")
-- add readline
add_options("readline")
- if is_plat("windows") or is_option("curses") then
+ if is_plat("windows") or has_config("curses") then
add_defines("XM_CONFIG_API_HAVE_CURSES")
end
diff --git a/core/xmake.lua b/core/xmake.lua
index 8181e5a1d..9e2e9fef7 100644
--- a/core/xmake.lua
+++ b/core/xmake.lua
@@ -5,7 +5,7 @@ set_project("xmake")
set_version("2.2.2", {build = "%Y%m%d%H%M"})
-- set xmake min version
-set_xmakever("2.1.8")
+set_xmakever("2.2.2")
-- set warning all as error
set_warnings("all", "error")