diff options
| author | Liu <[email protected]> | 2019-12-02 21:32:50 +0800 |
|---|---|---|
| committer | Liu <[email protected]> | 2019-12-02 21:33:15 +0800 |
| commit | 30d4183095aa5dcdb9cbe00b1b48e45ca31424fe (patch) | |
| tree | b8e47b54d84dab64cc9a65e101fcc947e52ea6cc /xmake | |
| parent | 45b739d927c89d93d85f626ab77dee70746c1cd3 (diff) | |
clear tail white space
Diffstat (limited to 'xmake')
59 files changed, 127 insertions, 127 deletions
diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua index d6ec9434c..74f8ba5fc 100644 --- a/xmake/actions/require/impl/action/install.lua +++ b/xmake/actions/require/impl/action/install.lua @@ -128,9 +128,9 @@ function main(package) -- the package scripts local scripts = { - package:script("install_before") + package:script("install_before") , package:script("install") - , package:script("install_after") + , package:script("install_after") } -- install the third-party package directly, e.g. brew::pcre2/libpcre2-8, conan::OpenSSL/1.0.2n@conan/stable diff --git a/xmake/actions/require/impl/action/test.lua b/xmake/actions/require/impl/action/test.lua index bd1a9edf8..72177a994 100644 --- a/xmake/actions/require/impl/action/test.lua +++ b/xmake/actions/require/impl/action/test.lua @@ -28,9 +28,9 @@ function main(package) -- the package scripts local scripts = { - package:script("test_before") + package:script("test_before") , package:script("test") - , package:script("test_after") + , package:script("test_after") } -- enter the test directory diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 139ebc3e5..d1ef9c6c3 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -36,10 +36,10 @@ import("repository") -- add_requires("zlib") -- add_requires("tbox >=1.5.1", "zlib >=1.2.11") -- add_requires("zlib master") --- add_requires("xmake-repo@tbox >=1.5.1") +-- add_requires("xmake-repo@tbox >=1.5.1") -- add_requires("aaa_bbb_ccc >=1.5.1 <1.6.0", {optional = true, alias = "mypkg", debug = true}) -- add_requires("tbox", {config = {coroutine = true, abc = "xxx"}}) --- add_requires("xmake::xmake-repo@tbox >=1.5.1") +-- add_requires("xmake::xmake-repo@tbox >=1.5.1") -- add_requires("conan::OpenSSL/1.0.2n@conan/stable") -- add_requires("brew::pcre2/libpcre2-8 10.x", {alias = "pcre2"}) -- diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 3349239a9..0e44ab58b 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -267,7 +267,7 @@ function _instance:lock(opt) if self:filelock():trylock(opt) then return true elseif option.get("diagnosis") then - utils.warning("the current package is being accessed by other processes, please waiting!") + utils.warning("the current package is being accessed by other processes, please waiting!") end local ok, errors = self:filelock():lock(opt) if not ok then diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 292adacba..7507daef6 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -79,13 +79,13 @@ function _instance:_do_check() -- get conditions local links = self:get("links") - local snippets = self:get(kind .. "snippets") + local snippets = self:get(kind .. "snippets") local types = self:get(kind .. "types") local funcs = self:get(kind .. "funcs") local includes = self:get(kind .. "includes") -- TODO it is deprecated - local snippet = self:get(kind .. "snippet") + local snippet = self:get(kind .. "snippet") if snippet then snippets = table.join(snippets or {}, snippet) end diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 0c3802347..70af2acbb 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -748,7 +748,7 @@ end function _instance:targetdir() -- the target directory - local targetdir = self:get("targetdir") + local targetdir = self:get("targetdir") if not targetdir then -- get build directory diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index 83bb9fead..a92031395 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -169,7 +169,7 @@ function sandbox_core_project.lock(opt) if sandbox_core_project.trylock(opt) then return true elseif baseoption.get("diagnosis") then - utils.warning("the current project is being accessed by other processes, please waiting!") + utils.warning("the current project is being accessed by other processes, please waiting!") end local ok, errors = sandbox_core_project.filelock():lock(opt) if not ok then diff --git a/xmake/modules/detect/tools/find_devenv.lua b/xmake/modules/detect/tools/find_devenv.lua index ce633e649..5f5bd9de3 100644 --- a/xmake/modules/detect/tools/find_devenv.lua +++ b/xmake/modules/detect/tools/find_devenv.lua @@ -52,7 +52,7 @@ function main(opt) if vcvarsall then for _, vsvars in pairs(vcvarsall) do if vsvars.DevEnvdir and os.isexec(path.join(vsvars.DevEnvdir, "devenv.exe")) then - program = path.join(vsvars.DevEnvdir, "devenv.exe") + program = path.join(vsvars.DevEnvdir, "devenv.exe") end end end diff --git a/xmake/modules/lib/detect/pkg_config.lua b/xmake/modules/lib/detect/pkg_config.lua index 4e766e313..5bc63c18d 100644 --- a/xmake/modules/lib/detect/pkg_config.lua +++ b/xmake/modules/lib/detect/pkg_config.lua @@ -150,7 +150,7 @@ function libinfo(name, opt) for _, flag in ipairs(flags:split('%s')) do -- get links - local link = flag:match("%-l(.*)") + local link = flag:match("%-l(.*)") if link then result.links = result.links or {} table.insert(result.links, link) @@ -158,7 +158,7 @@ function libinfo(name, opt) -- get linkdirs local linkdirs = nil - local linkdir = flag:match("%-L(.*)") + local linkdir = flag:match("%-L(.*)") if linkdir and os.isdir(linkdir) then result.linkdirs = result.linkdirs or {} table.insert(result.linkdirs, linkdir) @@ -166,7 +166,7 @@ function libinfo(name, opt) -- get includedirs local includedirs = nil - local includedir = flag:match("%-I(.*)") + local includedir = flag:match("%-I(.*)") if includedir and os.isdir(includedir) then result.includedirs = result.includedirs or {} table.insert(result.includedirs, includedir) diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua index 0292bbb9b..bdbcd7bc2 100644 --- a/xmake/modules/net/ping.lua +++ b/xmake/modules/net/ping.lua @@ -44,7 +44,7 @@ function main(hosts, opt) -- do not force ping? enable cache local cacheinfo = nil if not opt.force then - cacheinfo = cache.load("net.ping") + cacheinfo = cache.load("net.ping") end -- run tasks diff --git a/xmake/modules/private/action/require/packagenv.lua b/xmake/modules/private/action/require/packagenv.lua index dd95eff7e..466ffd160 100644 --- a/xmake/modules/private/action/require/packagenv.lua +++ b/xmake/modules/private/action/require/packagenv.lua @@ -33,7 +33,7 @@ function _enter_package(package_name, envs, installdir) end -- add the new environments - oldenvs.PATH = os.getenv("PATH") + oldenvs.PATH = os.getenv("PATH") for name, values in pairs(envs) do oldenvs[name] = oldenvs[name] or os.getenv(name) if name == "PATH" then diff --git a/xmake/modules/ui/app/version.lua b/xmake/modules/ui/app/version.lua index 4fd026ec0..03b5254f7 100644 --- a/xmake/modules/ui/app/version.lua +++ b/xmake/modules/ui/app/version.lua @@ -38,7 +38,7 @@ function app:init() self:background_set("blue") -- disable color code output - os.setenv("COLORTERM", "nocolor") + os.setenv("COLORTERM", "nocolor") -- get version info local version = os.iorun("xmake --version") diff --git a/xmake/platforms/android/config.lua b/xmake/platforms/android/config.lua index 0051f6448..df581dae0 100644 --- a/xmake/platforms/android/config.lua +++ b/xmake/platforms/android/config.lua @@ -56,7 +56,7 @@ end function _toolchains() -- get cross - local cross = config.get("cross") + local cross = config.get("cross") -- get gcc toolchain bin directory local gcc_toolchain_bin = nil diff --git a/xmake/platforms/cross/load.lua b/xmake/platforms/cross/load.lua index e44436da5..4198ad62b 100644 --- a/xmake/platforms/cross/load.lua +++ b/xmake/platforms/cross/load.lua @@ -25,7 +25,7 @@ import("core.project.config") function main(platform) -- init linkdirs and includedirs - local sdkdir = config.get("sdk") + local sdkdir = config.get("sdk") if sdkdir then local includedir = path.join(sdkdir, "include") if os.isdir(includedir) then diff --git a/xmake/platforms/linux/load.lua b/xmake/platforms/linux/load.lua index dcdacd8c1..848dcc54f 100644 --- a/xmake/platforms/linux/load.lua +++ b/xmake/platforms/linux/load.lua @@ -28,7 +28,7 @@ function main(platform) if config.get("cross") or config.get("bin") or config.get("sdk") then -- init linkdirs and includedirs - local sdkdir = config.get("sdk") + local sdkdir = config.get("sdk") if sdkdir then local includedir = path.join(sdkdir, "include") if os.isdir(includedir) then diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua index 29f0b28f7..878c9b8b2 100644 --- a/xmake/rules/c++/modules/xmake.lua +++ b/xmake/rules/c++/modules/xmake.lua @@ -20,6 +20,6 @@ -- define rule: c++.build.modules rule("c++.build.modules") - set_extensions(".mpp", ".mxx", ".cppm", ".ixx") + set_extensions(".mpp", ".mxx", ".cppm", ".ixx") before_build_files("build_modulefiles") diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua index 41ae6a388..0a1d4d4df 100644 --- a/xmake/rules/protobuf/proto.lua +++ b/xmake/rules/protobuf/proto.lua @@ -32,7 +32,7 @@ function main(target, sourcekind, sourcefile_proto, opt) -- find protoc local protoc = target:data("protobuf.protoc") if not protoc and sourcekind == "cxx" then - protoc = find_tool("protoc") + protoc = find_tool("protoc") if protoc and protoc.program then target:data_set("protobuf.protoc", protoc.program) end diff --git a/xmake/rules/wdk/sign/sign.lua b/xmake/rules/wdk/sign/sign.lua index 934615db0..f2563b1e6 100644 --- a/xmake/rules/wdk/sign/sign.lua +++ b/xmake/rules/wdk/sign/sign.lua @@ -61,12 +61,12 @@ function main(target, filepath, mode) -- init arguments local argv = {"sign", "/v", "/t", timestamp} - local company = target:values("wdk.sign.company") + local company = target:values("wdk.sign.company") if company then table.insert(argv, "/n") table.insert(argv, company) end - local certfile = target:values("wdk.sign.certfile") + local certfile = target:values("wdk.sign.certfile") if certfile then table.insert(argv, "/ac") table.insert(argv, certfile) diff --git a/xmake/rules/wdk/sign/xmake.lua b/xmake/rules/wdk/sign/xmake.lua index 4344ea301..6786cb910 100644 --- a/xmake/rules/wdk/sign/xmake.lua +++ b/xmake/rules/wdk/sign/xmake.lua @@ -103,7 +103,7 @@ rule("wdk.sign") end -- get sign mode - local signmode = target:values("wdk.sign.mode") + local signmode = target:values("wdk.sign.mode") if not signmode then return end diff --git a/xmake/scripts/faq.lua b/xmake/scripts/faq.lua index 602c89c34..1a2154c7a 100644 --- a/xmake/scripts/faq.lua +++ b/xmake/scripts/faq.lua @@ -2,11 +2,11 @@ -- FAQ -- -- You can enter the project directory firstly before building project. --- +-- -- $ cd projectdir --- +-- -- 1. How to build project? --- +-- -- $ xmake -- -- 2. How to configure project? @@ -27,12 +27,12 @@ -- -- 5. How to install target to the system directory or other output directory? -- --- $ xmake install +-- $ xmake install -- $ xmake install -o installdir -- -- 6. Add some frequently-used compilation flags in xmake.lua -- --- @code +-- @code -- -- add debug and release modes -- add_rules("mode.debug", "mode.release") -- @@ -45,9 +45,9 @@ -- -- set language: c99, c++11 -- set_languages("c99", "c++11") -- --- -- set optimization: none, faster, fastest, smallest +-- -- set optimization: none, faster, fastest, smallest -- set_optimize("fastest") --- +-- -- -- add include search directories -- add_includedirs("/usr/include", "/usr/local/include") -- diff --git a/xmake/templates/c++/console/project/xmake.lua b/xmake/templates/c++/console/project/xmake.lua index 5ea3f6136..00499409f 100644 --- a/xmake/templates/c++/console/project/xmake.lua +++ b/xmake/templates/c++/console/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,6 +9,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") ${FAQ} diff --git a/xmake/templates/c++/qt.console/project/xmake.lua b/xmake/templates/c++/qt.console/project/xmake.lua index 4025a7218..855d487c3 100644 --- a/xmake/templates/c++/qt.console/project/xmake.lua +++ b/xmake/templates/c++/qt.console/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,6 +9,6 @@ target("${TARGETNAME}") add_rules("qt.console") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") ${FAQ} diff --git a/xmake/templates/c++/qt.quickapp/project/xmake.lua b/xmake/templates/c++/qt.quickapp/project/xmake.lua index 0a55677e8..3cd32674f 100644 --- a/xmake/templates/c++/qt.quickapp/project/xmake.lua +++ b/xmake/templates/c++/qt.quickapp/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -12,7 +12,7 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") add_files("src/qml.qrc") ${FAQ} diff --git a/xmake/templates/c++/qt.quickapp_static/project/xmake.lua b/xmake/templates/c++/qt.quickapp_static/project/xmake.lua index b606b5f20..67d4933c5 100644 --- a/xmake/templates/c++/qt.quickapp_static/project/xmake.lua +++ b/xmake/templates/c++/qt.quickapp_static/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- includes @@ -15,7 +15,7 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") add_files("src/qml.qrc") -- add plugin: qml.QtQuick diff --git a/xmake/templates/c++/qt.shared/project/xmake.lua b/xmake/templates/c++/qt.shared/project/xmake.lua index ac70b48de..2092e95a9 100644 --- a/xmake/templates/c++/qt.shared/project/xmake.lua +++ b/xmake/templates/c++/qt.shared/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -12,7 +12,7 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") -- add defines add_defines("QT_DEMO_LIBRARY") diff --git a/xmake/templates/c++/qt.static/project/xmake.lua b/xmake/templates/c++/qt.static/project/xmake.lua index 2bf4505c5..36b1f6157 100644 --- a/xmake/templates/c++/qt.static/project/xmake.lua +++ b/xmake/templates/c++/qt.static/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -12,7 +12,7 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") -- add frameworks add_frameworks("QtGui") diff --git a/xmake/templates/c++/qt.widgetapp/project/xmake.lua b/xmake/templates/c++/qt.widgetapp/project/xmake.lua index e7407f1fd..556113a3b 100644 --- a/xmake/templates/c++/qt.widgetapp/project/xmake.lua +++ b/xmake/templates/c++/qt.widgetapp/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -12,10 +12,10 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") add_files("src/mainwindow.ui") -- add files with Q_OBJECT meta (only for qt.moc) - add_files("src/mainwindow.h") + add_files("src/mainwindow.h") ${FAQ} diff --git a/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua b/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua index fe4eb971c..2d3ad7c76 100644 --- a/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua +++ b/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- includes @@ -15,11 +15,11 @@ target("${TARGETNAME}") add_headerfiles("src/*.h") -- add files - add_files("src/*.cpp") + add_files("src/*.cpp") add_files("src/mainwindow.ui") -- add files with Q_OBJECT meta (only for qt.moc) - add_files("src/mainwindow.h") + add_files("src/mainwindow.h") -- add plugin: QSvgPlugin (optional) qt_add_static_plugins("QSvgPlugin", {linkdirs = "plugins/imageformats", links = {"qsvg", "Qt5Svg"}}) diff --git a/xmake/templates/c++/shared/project/xmake.lua b/xmake/templates/c++/shared/project/xmake.lua index 79ce52043..b4feb75ed 100644 --- a/xmake/templates/c++/shared/project/xmake.lua +++ b/xmake/templates/c++/shared/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,7 +9,7 @@ target("${TARGETNAME}") set_kind("shared") -- add files - add_files("src/interface.cpp") + add_files("src/interface.cpp") -- add target target("${TARGETNAME}_demo") @@ -21,6 +21,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/test.cpp") + add_files("src/test.cpp") ${FAQ} diff --git a/xmake/templates/c++/static_library/project/xmake.lua b/xmake/templates/c++/static_library/project/xmake.lua index c42aa839c..ade7a520d 100644 --- a/xmake/templates/c++/static_library/project/xmake.lua +++ b/xmake/templates/c++/static_library/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,7 +9,7 @@ target("${TARGETNAME}") set_kind("static") -- add files - add_files("src/interface.cpp") + add_files("src/interface.cpp") -- add target target("${TARGETNAME}_demo") @@ -21,6 +21,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/test.cpp") + add_files("src/test.cpp") ${FAQ} diff --git a/xmake/templates/c++/tbox.console/project/src/xmake.lua b/xmake/templates/c++/tbox.console/project/src/xmake.lua index 63056c764..8664f5347 100644 --- a/xmake/templates/c++/tbox.console/project/src/xmake.lua +++ b/xmake/templates/c++/tbox.console/project/src/xmake.lua @@ -11,5 +11,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.cpp") + add_files("*.cpp") diff --git a/xmake/templates/c++/tbox.console/project/xmake.lua b/xmake/templates/c++/tbox.console/project/xmake.lua index 292b676c1..e2dc5c6e4 100644 --- a/xmake/templates/c++/tbox.console/project/xmake.lua +++ b/xmake/templates/c++/tbox.console/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,14 +58,14 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src") +includes("src") ${FAQ} diff --git a/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua b/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua index b17bd70b4..cbd73410b 100644 --- a/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua +++ b/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua @@ -11,7 +11,7 @@ target("demo") add_defines("__tb_prefix__=\"demo\"") -- add files - add_files("*.cpp") + add_files("*.cpp") -- add packages add_packages("tbox") diff --git a/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua b/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua index 46559ec9d..dd27e7cff 100644 --- a/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua +++ b/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua @@ -17,5 +17,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.cpp") + add_files("*.cpp") diff --git a/xmake/templates/c++/tbox.shared/project/xmake.lua b/xmake/templates/c++/tbox.shared/project/xmake.lua index 02a9271a3..f2dec7a83 100644 --- a/xmake/templates/c++/tbox.shared/project/xmake.lua +++ b/xmake/templates/c++/tbox.shared/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,14 +58,14 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") +includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") ${FAQ} diff --git a/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua b/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua index b17bd70b4..cbd73410b 100644 --- a/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua +++ b/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua @@ -11,7 +11,7 @@ target("demo") add_defines("__tb_prefix__=\"demo\"") -- add files - add_files("*.cpp") + add_files("*.cpp") -- add packages add_packages("tbox") diff --git a/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua b/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua index cb5f26ec6..1c7d3ea7b 100644 --- a/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua +++ b/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua @@ -17,5 +17,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.cpp") + add_files("*.cpp") diff --git a/xmake/templates/c++/tbox.static/project/xmake.lua b/xmake/templates/c++/tbox.static/project/xmake.lua index 02a9271a3..f2dec7a83 100644 --- a/xmake/templates/c++/tbox.static/project/xmake.lua +++ b/xmake/templates/c++/tbox.static/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,14 +58,14 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") +includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") ${FAQ} diff --git a/xmake/templates/c/console/project/xmake.lua b/xmake/templates/c/console/project/xmake.lua index dedb01e53..635cdc160 100644 --- a/xmake/templates/c/console/project/xmake.lua +++ b/xmake/templates/c/console/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,6 +9,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.c") + add_files("src/*.c") ${FAQ} diff --git a/xmake/templates/c/shared/project/xmake.lua b/xmake/templates/c/shared/project/xmake.lua index 4aaddabc9..b0f490620 100644 --- a/xmake/templates/c/shared/project/xmake.lua +++ b/xmake/templates/c/shared/project/xmake.lua @@ -1,5 +1,5 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -9,7 +9,7 @@ target("${TARGETNAME}") set_kind("shared") -- add files - add_files("src/interface.c") + add_files("src/interface.c") -- add target target("${TARGETNAME}_demo") @@ -21,6 +21,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/test.c") + add_files("src/test.c") ${FAQ} diff --git a/xmake/templates/c/static/project/xmake.lua b/xmake/templates/c/static/project/xmake.lua index a01a4407d..632776b96 100644 --- a/xmake/templates/c/static/project/xmake.lua +++ b/xmake/templates/c/static/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,7 +8,7 @@ target("${TARGETNAME}") set_kind("static") -- add files - add_files("src/interface.c") + add_files("src/interface.c") -- add target target("${TARGETNAME}_demo") @@ -20,6 +20,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/test.c") + add_files("src/test.c") ${FAQ} diff --git a/xmake/templates/c/tbox.console/project/src/xmake.lua b/xmake/templates/c/tbox.console/project/src/xmake.lua index 16287c25b..22773aad5 100644 --- a/xmake/templates/c/tbox.console/project/src/xmake.lua +++ b/xmake/templates/c/tbox.console/project/src/xmake.lua @@ -11,5 +11,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.c") + add_files("*.c") diff --git a/xmake/templates/c/tbox.console/project/xmake.lua b/xmake/templates/c/tbox.console/project/xmake.lua index 83a45434f..31edb3c75 100644 --- a/xmake/templates/c/tbox.console/project/xmake.lua +++ b/xmake/templates/c/tbox.console/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,12 +58,12 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src") +includes("src") diff --git a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua b/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua index 145096668..bd1a59ed6 100644 --- a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua +++ b/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua @@ -11,7 +11,7 @@ target("demo") add_defines("__tb_prefix__=\"demo\"") -- add files - add_files("*.c") + add_files("*.c") -- add packages add_packages("tbox") diff --git a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua b/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua index 1941864d0..4f77e0337 100644 --- a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua +++ b/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua @@ -17,5 +17,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.c") + add_files("*.c") diff --git a/xmake/templates/c/tbox.shared/project/xmake.lua b/xmake/templates/c/tbox.shared/project/xmake.lua index 02a9271a3..f2dec7a83 100644 --- a/xmake/templates/c/tbox.shared/project/xmake.lua +++ b/xmake/templates/c/tbox.shared/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,14 +58,14 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") +includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") ${FAQ} diff --git a/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua b/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua index 145096668..bd1a59ed6 100644 --- a/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua +++ b/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua @@ -11,7 +11,7 @@ target("demo") add_defines("__tb_prefix__=\"demo\"") -- add files - add_files("*.c") + add_files("*.c") -- add packages add_packages("tbox") diff --git a/xmake/templates/c/tbox.static/project/src/_library/xmake.lua b/xmake/templates/c/tbox.static/project/src/_library/xmake.lua index bfc40162e..fecf32edb 100644 --- a/xmake/templates/c/tbox.static/project/src/_library/xmake.lua +++ b/xmake/templates/c/tbox.static/project/src/_library/xmake.lua @@ -17,5 +17,5 @@ target("${TARGETNAME}") add_packages("tbox") -- add files - add_files("*.c") + add_files("*.c") diff --git a/xmake/templates/c/tbox.static/project/xmake.lua b/xmake/templates/c/tbox.static/project/xmake.lua index 02a9271a3..f2dec7a83 100644 --- a/xmake/templates/c/tbox.static/project/xmake.lua +++ b/xmake/templates/c/tbox.static/project/xmake.lua @@ -44,13 +44,13 @@ if is_plat("windows") then if is_mode("release") then -- link libcmt.lib - add_cxflags("-MT") + add_cxflags("-MT") -- the debug mode elseif is_mode("debug") then -- link libcmtd.lib - add_cxflags("-MTd") + add_cxflags("-MTd") end -- no msvcrt.lib @@ -58,14 +58,14 @@ if is_plat("windows") then end -- add syslinks -if is_plat("windows") then add_syslinks("ws2_32") -elseif is_plat("android") then add_syslinks("m", "c") +if is_plat("windows") then add_syslinks("ws2_32") +elseif is_plat("android") then add_syslinks("m", "c") else add_syslinks("pthread", "dl", "m", "c") end -- add requires add_requires("tbox", {debug = is_mode("debug")}) -- include project sources -includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") +includes("src/${TARGETNAME}", "src/${TARGETNAME}_demo") ${FAQ} diff --git a/xmake/templates/dlang/console/project/xmake.lua b/xmake/templates/dlang/console/project/xmake.lua index 9f27dbf7f..5f522baf8 100644 --- a/xmake/templates/dlang/console/project/xmake.lua +++ b/xmake/templates/dlang/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,6 +8,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.d") + add_files("src/*.d") ${FAQ} diff --git a/xmake/templates/dlang/shared/project/xmake.lua b/xmake/templates/dlang/shared/project/xmake.lua index 7fe11f488..23fe35a70 100644 --- a/xmake/templates/dlang/shared/project/xmake.lua +++ b/xmake/templates/dlang/shared/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,7 +8,7 @@ target("${TARGETNAME}") set_kind("shared") -- add files - add_files("src/interfaces.d") + add_files("src/interfaces.d") -- add target target("${TARGETNAME}_demo") @@ -20,6 +20,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/main.d") + add_files("src/main.d") ${FAQ} diff --git a/xmake/templates/dlang/static/project/xmake.lua b/xmake/templates/dlang/static/project/xmake.lua index 6a3d805ad..281c63734 100644 --- a/xmake/templates/dlang/static/project/xmake.lua +++ b/xmake/templates/dlang/static/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,7 +8,7 @@ target("${TARGETNAME}") set_kind("static") -- add files - add_files("src/interfaces.d") + add_files("src/interfaces.d") -- add target target("${TARGETNAME}_demo") @@ -20,6 +20,6 @@ target("${TARGETNAME}_demo") add_deps("${TARGETNAME}") -- add files - add_files("src/main.d") + add_files("src/main.d") ${FAQ} diff --git a/xmake/templates/go/console/project/xmake.lua b/xmake/templates/go/console/project/xmake.lua index 35f458b68..e1c7a3735 100644 --- a/xmake/templates/go/console/project/xmake.lua +++ b/xmake/templates/go/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,6 +8,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.go") + add_files("src/*.go") ${FAQ} diff --git a/xmake/templates/go/static/project/xmake.lua b/xmake/templates/go/static/project/xmake.lua index 3c0f05209..96932450c 100644 --- a/xmake/templates/go/static/project/xmake.lua +++ b/xmake/templates/go/static/project/xmake.lua @@ -5,7 +5,7 @@ target("module") set_kind("static") -- add files - add_files("src/test/*.go") + add_files("src/test/*.go") -- add target target("${TARGETNAME}_demo") @@ -17,7 +17,7 @@ target("${TARGETNAME}_demo") add_deps("module") -- add files - add_files("src/*.go") + add_files("src/*.go") -- add link directory add_linkdirs("$(buildir)") diff --git a/xmake/templates/objc++/console/project/xmake.lua b/xmake/templates/objc++/console/project/xmake.lua index 736de146c..dda69c1f7 100644 --- a/xmake/templates/objc++/console/project/xmake.lua +++ b/xmake/templates/objc++/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,7 +8,7 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.mm") + add_files("src/*.mm") -- for macosx or ios if is_os("macosx", "ios") then diff --git a/xmake/templates/objc/console/project/xmake.lua b/xmake/templates/objc/console/project/xmake.lua index 199d79528..9658f9486 100644 --- a/xmake/templates/objc/console/project/xmake.lua +++ b/xmake/templates/objc/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,7 +8,7 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.m") + add_files("src/*.m") -- add frameworks add_frameworks("Foundation", "CoreFoundation") diff --git a/xmake/templates/rust/console/project/xmake.lua b/xmake/templates/rust/console/project/xmake.lua index 15fafa7f2..7a363c461 100644 --- a/xmake/templates/rust/console/project/xmake.lua +++ b/xmake/templates/rust/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,6 +8,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.rs") + add_files("src/*.rs") ${FAQ} diff --git a/xmake/templates/rust/static/project/xmake.lua b/xmake/templates/rust/static/project/xmake.lua index fcaaa55f7..cbe81addf 100644 --- a/xmake/templates/rust/static/project/xmake.lua +++ b/xmake/templates/rust/static/project/xmake.lua @@ -5,7 +5,7 @@ target("interfaces") set_kind("static") -- add files - add_files("src/interfaces.rs") + add_files("src/interfaces.rs") -- add target target("${TARGETNAME}_demo") @@ -17,7 +17,7 @@ target("${TARGETNAME}_demo") add_deps("interfaces") -- add files - add_files("src/main.rs") + add_files("src/main.rs") -- add link directory add_linkdirs("$(buildir)") diff --git a/xmake/templates/swift/console/project/xmake.lua b/xmake/templates/swift/console/project/xmake.lua index 4b8c614fa..f607b1127 100644 --- a/xmake/templates/swift/console/project/xmake.lua +++ b/xmake/templates/swift/console/project/xmake.lua @@ -1,4 +1,4 @@ --- add modes: debug and release +-- add modes: debug and release add_rules("mode.debug", "mode.release") -- add target @@ -8,6 +8,6 @@ target("${TARGETNAME}") set_kind("binary") -- add files - add_files("src/*.swift") + add_files("src/*.swift") ${FAQ} |
