# Build system fixes for Linux

Use proper library names instead of hard-coded paths when linking to dll
projects, so they can be found properly at run-time

This was SVN commit r6759.
This commit is contained in:
Ykkrosh 2009-03-22 16:38:27 +00:00
parent dc7809f8d6
commit 8c1fc507ab
3 changed files with 19 additions and 2 deletions

View File

@ -354,11 +354,22 @@ static const char* filterLinks(const char* name)
const char* lang = prj_get_language_for(i); const char* lang = prj_get_language_for(i);
const char *kind = prj_get_config_for(i)->kind; const char *kind = prj_get_config_for(i)->kind;
if (matches(kind, "cxxtestgen")) if (matches(kind, "cxxtestgen"))
{
return NULL; return NULL;
}
else if (matches(lang, "c++") || matches(lang, "c")) else if (matches(lang, "c++") || matches(lang, "c"))
{
if (matches(prj_get_kind_for(i), "dll"))
{
strcpy(g_buffer, "-l");
strcat(g_buffer, prj_get_targetname_for(i));
return g_buffer;
}
else
{ {
return prj_get_target_for(i); return prj_get_target_for(i);
} }
}
else else
{ {
return NULL; return NULL;

View File

@ -378,6 +378,11 @@ const char* prj_get_kind()
return my_cfg->kind; return my_cfg->kind;
} }
const char* prj_get_kind_for(int i)
{
return project->packages[i]->kind;
}
int prj_is_kind(const char* kind) int prj_is_kind(const char* kind)
{ {
return matches(my_cfg->kind, kind); return matches(my_cfg->kind, kind);

View File

@ -104,6 +104,7 @@ const char** prj_get_defines();
const char* prj_get_extension(); const char* prj_get_extension();
const char** prj_get_files(); const char** prj_get_files();
const char* prj_get_kind(); const char* prj_get_kind();
const char* prj_get_kind_for(int i);
const char** prj_get_incpaths(); const char** prj_get_incpaths();
const char* prj_get_language(); const char* prj_get_language();
const char* prj_get_language_for(int i); const char* prj_get_language_for(int i);
@ -139,7 +140,7 @@ const char* prj_get_cxxtest_rootoptions();
const char* prj_get_cxxtest_rootfile(); const char* prj_get_cxxtest_rootfile();
const char* prj_get_pkgfilename(const char* extension); const char* prj_get_pkgfilename(const char* extension);
const char* prj_get_pkgname(); const char* prj_get_pkgname();
const char* prj_get_pkgname_for(); const char* prj_get_pkgname_for(int i);
const char* prj_get_pkgobjdir(); const char* prj_get_pkgobjdir();
const char* prj_get_pkgpath(); const char* prj_get_pkgpath();
const char* prj_get_pkgpath_for(int i); const char* prj_get_pkgpath_for(int i);