summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/dmd.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-05 23:44:21 +0800
committerruki <[email protected]>2024-01-05 23:44:21 +0800
commitf5a802f8d035c19068e4f52eecea638f10a06a4a (patch)
treeabe92fc1b0c639c5bd738dc33454ca71ff9a41a9 /xmake/modules/core/tools/dmd.lua
parent8a9f894ca802957b9032042183f902293ee38481 (diff)
add frameworks for dlang
Diffstat (limited to 'xmake/modules/core/tools/dmd.lua')
-rw-r--r--xmake/modules/core/tools/dmd.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index 8be22bf97..182c2ce04 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -143,6 +143,20 @@ function nf_linkdir(self, dir)
end
end
+-- make the framework flag
+function nf_framework(self, framework)
+ if self:is_plat("macosx") then
+ return {"-L-framework", "-L" .. framework}
+ end
+end
+
+-- make the frameworkdir flag
+function nf_frameworkdir(self, frameworkdir)
+ if self:is_plat("macosx") then
+ return {"-L-F" .. path.translate(frameworkdir)}
+ end
+end
+
-- make the rpathdir flag
function nf_rpathdir(self, dir)
if not self:is_plat("windows") then