Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorstarkos <none@none>2010-01-01 01:46:45 +0300
committerstarkos <none@none>2010-01-01 01:46:45 +0300
commitfc97fc34d1b09c1cf1e69b7d1b02b68803e8a971 (patch)
treee6b344abbc5351561949522895e3d9b5f87f8454 /src/tools
parent38a75ffbebba2fe623bc366c2e332d8c5fe612f2 (diff)
Support framework linking in makefiles
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/gcc.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua
index 4b86967..247f609 100644
--- a/src/tools/gcc.lua
+++ b/src/tools/gcc.lua
@@ -137,10 +137,8 @@
end
end
- if cfg.kind == "WindowedApp" then
- if cfg.system == "windows" then
- table.insert(result, "-mwindows")
- end
+ if cfg.kind == "WindowedApp" and cfg.system == "windows" then
+ table.insert(result, "-mwindows")
end
local platform = platforms[cfg.platform]
@@ -175,7 +173,11 @@
function premake.gcc.getlinkflags(cfg)
local result = { }
for _, value in ipairs(premake.getlinks(cfg, "all", "basename")) do
- table.insert(result, '-l' .. _MAKE.esc(value))
+ if path.getextension(value) == ".framework" then
+ table.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))
+ else
+ table.insert(result, '-l' .. _MAKE.esc(value))
+ end
end
return result
end