diff --git a/src/bindings/dotnet/SConscript b/src/bindings/dotnet/SConscript index 717c8604a263a9ec241ae41b9aac49a16de210ec..739f2d2f3c88a97ae0f70de3235af9cd4a1140fa 100644 --- a/src/bindings/dotnet/SConscript +++ b/src/bindings/dotnet/SConscript @@ -39,7 +39,14 @@ dotnettestenv = dotnetenv.Clone() #dotnettestenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0])) #dotnettests = ['t/hammer.t'] -dotnettestenv.Append(CILLIBS=['/usr/lib/cli/nunit.core-2.6/nunit.core.dll','/usr/lib/cli/nunit.util-2.6/nunit.util.dll','/usr/lib/cli/nunit.framework-2.6/nunit.framework.dll','/usr/lib/cli/nunit.core.interfaces-2.6/nunit.core.interfaces.dll', thisdir + "/hammer.dll"]) + +def makeCIL(env, cmd): + libs = cmd.split(' ') + for lib in libs: + env.Append(CILLIBS=[lib[3:]]) + +dotnettestenv.ParseConfig('pkg-config --libs nunit', makeCIL) +dotnettestenv.Append(CILLIBS=[thisdir + "/hammer.dll"]) dotnettestlib = dotnettestenv.CLILibrary('hammer_test.dll', Glob('test/*.cs')) Depends(dotnettestlib, hammer_dll) @@ -49,7 +56,7 @@ Depends(dotnettestlib, hammer_dll) Depends(dotnettestlib, libhammer_dotnet) dotnettest = Alias("testdotnet", [dotnettestexec], dotnettestexec) AlwaysBuild(dotnettestexec) -testruns.append(dotnettestlib) +testruns.extend(dotnettestlib) #dotnetinstallexec = dotnetenv.Command(None, libhammer_dotnet, "make install -C " + targetdir) #dotnetinstall = Alias("installdotnet", [dotnetinstallexec], dotnetinstallexec)