diff options
author | Jason Perkins <starkos@industriousone.com> | 2013-05-02 19:51:52 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2013-05-02 19:51:52 +0400 |
commit | ce29979cca0b9f6722f670b8cd0b10aef1ee50ff (patch) | |
tree | a356c657ce9ceac2a4fb87bc3cef9a7a9a55cb74 | |
parent | e1478cbb172cfb7bcb6220d154fc6f12d5e04bc6 (diff) |
Fix bug 171: ImpLib used incorrectly in dependency paths
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | src/base/project.lua | 6 | ||||
-rw-r--r-- | tests/test_targets.lua | 13 |
3 files changed, 16 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 20a01bc..07aa41e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -72,6 +72,7 @@ * Patch 154: Fix .def file support for VS2010 (Riccardo Ghetta) * Patch 159: Validate all values passed to options (Moi_ioM) * Pull 11: Add support for Visual Studio 2012 (Oliver Schneider) +* Bug 171: ImpLib used incorrectly in dependency paths ------- diff --git a/src/base/project.lua b/src/base/project.lua index 9c8b4db..0fc6b04 100644 --- a/src/base/project.lua +++ b/src/base/project.lua @@ -479,7 +479,11 @@ end -- Initialize the target components - local field = iif(direction == "build", "target", "implib") + local field = "build" + if direction == "link" and cfg.kind == "SharedLib" then + field = "implib" + end + local name = cfg[field.."name"] or cfg.targetname or cfg.project.name local dir = cfg[field.."dir"] or cfg.targetdir or path.getrelative(cfg.location, cfg.basedir) local prefix = "" diff --git a/tests/test_targets.lua b/tests/test_targets.lua index c0f6d44..e530851 100644 --- a/tests/test_targets.lua +++ b/tests/test_targets.lua @@ -5,7 +5,7 @@ -- T.targets = { } - + local cfg function T.targets.setup() cfg = { } @@ -95,7 +95,7 @@ result = premake.gettarget(cfg, "build", "posix", "posix", "macosx") test.isequal([[../bin/MyProject.app/Contents/MacOS/MyProject]], result.fullpath) end - + function T.targets.WindowedApp_Build_PS3Names() cfg.kind = "WindowedApp" result = premake.gettarget(cfg, "build", "posix", "PS3", "macosx") @@ -221,6 +221,13 @@ test.isequal([[../bin/libMyProject.a]], result.fullpath) end + function T.targets.StaticLib_Link_IgnoresImpLib() + cfg.kind = "StaticLib" + cfg.implibdir = "../lib" + result = premake.gettarget(cfg, "link", "posix", "posix", "macosx") + test.isequal([[../bin/libMyProject.a]], result.fullpath) + end + -- @@ -232,4 +239,4 @@ result = premake.gettarget(cfg, "build", "windows", "windows", "linux") test.isequal([[..\bin]], result.directory) test.isequal([[..\bin\MyProject.exe]], result.fullpath) - end
\ No newline at end of file + end |