Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vs2003_solution.c « vs200x « actions « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 448cc708481e9f6cbefe1bb3614bc967f9a66ad8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
 * \file   vs2003_solution.c
 * \brief  Visual Studio 2003 solution generation functions.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include <assert.h>
#include <stdlib.h>
#include "premake.h"
#include "vs200x_solution.h"


/**
 * Create the Visual Studio 2003 solution configuration block.
 */
int vs2003_solution_configuration(Solution sln, Stream strm)
{
	int i, n, z;

	z  = stream_writeline(strm, "Global");
	z |= stream_writeline(strm, "\tGlobalSection(SolutionConfiguration) = preSolution");

	n = solution_num_configs(sln);
	for (i = 0; i < n; ++i)
	{
		const char* config_name = solution_get_config(sln, i);
		z |= stream_writeline(strm, "\t\t%s = %s", config_name, config_name);
	}

	z |= stream_writeline(strm, "\tEndGlobalSection");
	return z;
}


/**
 * Write the Visual Studio 2003 solution file signature.
 */
int vs2003_solution_signature(Solution sln, Stream strm)
{
	int z;
	UNUSED(sln);
	stream_set_newline(strm, "\r\n");
	z = stream_writeline(strm, "Microsoft Visual Studio Solution File, Format Version 8.00");
	return z;
}