예제 #1
0
const char* vs_filter_links(const char* name)
{
	int i = prj_find_package(name);
	if (i >= 0)
	{
		const char* lang = prj_get_language_for(i);
		const char* kind = prj_get_config_for(i)->kind;
		if (matches(kind, "cxxtestgen"))
			return NULL;
		// note that "run" matches against the /current/ project, not the link
		// dependency we've been run for
		else if (prj_is_kind("run"))
		{
			return path_translate(prj_get_target_for(i), "windows");
		}
		else if (matches(lang, "c") || matches(lang, "c++"))
		{
			strcpy(g_buffer, prj_get_libdir_for(i));
			return path_combine(g_buffer, prj_get_targetname_for(i));
		}
		else
			return NULL;
	}
	else
	{
		return name;
	}
}
예제 #2
0
static const char* filterLinksForPaths(const char* name)
{
	int i = prj_find_package(name);
	if (i >= 0)
	{
		const char* lang = prj_get_language_for(i);
		if (matches(lang, "c++") || matches(lang, "c"))
		{
			const char* target = prj_get_target_for(i);
			const char* dir = path_getdir(target);
			if (!prj_has_libpath(dir))
			{
				return dir;
			}
		}
	}
	return NULL;
}