summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-06-13 11:10:41 +0800
committerruki <[email protected]>2021-06-13 11:10:41 +0800
commit8a96a1eeafdd83afa7b1b590d06337a85eb4fba7 (patch)
tree248a4a9088d8f95a42a253b5416032e7e26933f9 /xmake/modules/private/action/require/impl/package.lua
parent60e522f32d327a0f1dc6860e123cff40adfc0402 (diff)
fix builtin configs
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua10
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."})