diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 1867173f..691f9753 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -828,6 +828,13 @@ tokens = true, } + api.register { + name = "syslibdirs", + scope = "config", + kind = "list:directory", + tokens = true, + } + api.register { name = "system", scope = "config", diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 6d7cae0b..f2c2eded 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -195,6 +195,7 @@ m.targetName, m.targetExt, m.includePath, + m.libraryPath, m.imageXexOutput, m.generateManifest, m.extensionsToDeleteOnClean, @@ -1296,6 +1297,14 @@ end + function m.libraryPath(cfg) + local dirs = vstudio.path(cfg, cfg.syslibdirs) + if #dirs > 0 then + p.x('%s;$(LibraryPath)', table.concat(dirs, ";")) + end + end + + function m.linkIncremental(cfg) if cfg.kind ~= premake.STATICLIB then diff --git a/tests/actions/vstudio/vc2010/test_output_props.lua b/tests/actions/vstudio/vc2010/test_output_props.lua index a0fd44fe..308ae305 100755 --- a/tests/actions/vstudio/vc2010/test_output_props.lua +++ b/tests/actions/vstudio/vc2010/test_output_props.lua @@ -273,3 +273,18 @@ ]] end + + function suite.onSystemLibraryDirs() + syslibdirs { "$(DXSDK_DIR)/lib/x86" } + prepare() + test.capture [[ + + true + .\ + obj\Debug\ + MyProject + .exe + $(DXSDK_DIR)\lib\x86;$(LibraryPath) + + ]] + end