diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index d9ee2f0cf..79ce5b7f9 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -220,19 +220,19 @@ end -- add some builtin configurations to package function _add_package_configurations(package) -- we can define configs to override it and it's default value in package() - if package:config("debug") ~= nil then + if package:config("debug") == nil then package:add("configs", "debug", {builtin = true, description = "Enable debug symbols.", default = false, type = "boolean"}) end - if package:config("shared") ~= nil then + if package:config("shared") == nil then package:add("configs", "shared", {builtin = true, description = "Enable shared library.", default = false, type = "boolean"}) end - if package:config("pic") ~= nil then + if package:config("pic") == nil then package:add("configs", "pic", {builtin = true, description = "Enable the position independent code.", default = true, type = "boolean"}) end - if package:config("vs_runtime") ~= nil then + if package:config("vs_runtime") == nil then package:add("configs", "vs_runtime", {builtin = true, description = "Set vs compiler runtime.", values = {"MT", "MTd", "MD", "MDd"}}) end - if package:config("toolchains") ~= nil then + if package:config("toolchains") == nil then package:add("configs", "toolchains", {builtin = true, description = "Set package toolchains only for cross-compilation."}) end package:add("configs", "cflags", {builtin = true, description = "Set the C compiler flags."}) |
