diff options
| author | ruki <[email protected]> | 2020-04-04 20:27:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-04 20:27:07 +0800 |
| commit | e8ac9b7af5b402999a9408e808b22c66dc53ef36 (patch) | |
| tree | 3a751ac31294e24bb15d69e5b502c4af83c5ce76 /xmake/modules/core/tools/gcc.lua | |
| parent | c7cb8b53e3c55986488b59aaf1c4c8eb7f191769 (diff) | |
fix rpath for framework
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index c5af92e8e..58c29229a 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -309,13 +309,13 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags, opt) -- add rpath for dylib (macho), e.g. -install_name @rpath/file.dylib local flags_extra = {} - if targetkind == "shared" and targetfile:endswith(".dylib") then + if targetkind == "shared" and is_plat("macosx", "iphoneos", "watchos") then table.insert(flags_extra, "-install_name") table.insert(flags_extra, "@rpath/" .. path.filename(targetfile)) end -- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc - if targetkind == "shared" and config.plat() == "mingw" then + if targetkind == "shared" and is_plat("mingw") then table.insert(flags_extra, "-Wl,--out-implib," .. os.args(path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib"))) end |
