summaryrefslogtreecommitdiff
path: root/build/win32/vs9/gir.vspropsin
blob: a42b214be02eb72fb03194fd630e7f3de75e4a53 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
	ProjectType="Visual C++"
	Version="8.00"
	Name="giprops"
	OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin"
	IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj\$(ProjectName)\"
	>
	<Tool
		Name="VCCLCompilerTool"
		AdditionalIncludeDirectories="..\..\..;..\..\..\girepository;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include"
		PreprocessorDefinitions="HAVE_CONFIG_H;WIN32"
		ForcedIncludeFiles="msvc_recommended_pragmas.h"
	/>
	<Tool
		Name="VCLinkerTool"
		AdditionalDependencies="gio-2.0.lib gobject-2.0.lib gmodule-2.0.lib gthread-2.0.lib glib-2.0.lib"
		AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
	/>
	<Tool
		Name="VCPreBuildEventTool"
		CommandLine="
if not exist ..\..\..\config.h copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
if not exist ..\..\..\tools\g-ir-scanner copy ..\..\..\tools\g-ir-scanner.in ..\..\..\tools\g-ir-scanner&#x0D;&#x0A;
if not exist ..\..\..\tools\g-ir-doc-tool copy ..\..\..\tools\g-ir-doc-tool.in ..\..\..\tools\g-ir-doc-tool&#x0D;&#x0A;
if not exist ..\..\..\tools\g-ir-annotation-tool copy ..\..\..\tools\g-ir-annotation-tool.in ..\..\..\tools\g-ir-annotation-tool&#x0D;&#x0A;
"
	/>
	<UserMacro
		Name="GlibEtcInstallRoot"
		Value="$(SolutionDir)\..\..\..\..\vs9\$(PlatformName)"
	/>
	<UserMacro
		Name="VSVER"
		Value="9"
	/>
	<UserMacro
		Name="BASE_GI_DIR"
		Value="$(SolutionDir)\..\..\.."
	/>
	<UserMacro
		Name="CopyDir"
		Value="$(GlibEtcInstallRoot)"
	/>
	<UserMacro
		Name="GIApiVersion"
		Value="1.0"
	/>
	<UserMacro
		Name="DefDir"
		Value="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj\$(ProjectName)"
	/>
	<UserMacro
		Name="GenerateGIRDef"
		Value="
		       echo EXPORTS &gt; $(DefDir)\girepository.def&#x0D;&#x0A;
		       cl -EP ..\..\..\girepository\girepository.symbols &gt;&gt; $(DefDir)\girepository.def&#x0D;&#x0A;
			  "
	/>
	<UserMacro
		Name="GenEverythingH"
		Value="
if exist ..\..\..\tests\everything.h goto DONE_GEN_EVERYTHING_C&#x0D;&#x0A;
cd ..\..\..\tests&#x0D;&#x0A;
set PATH=$(GlibEtcInstallRoot)\bin;$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin;%PYTHONDIR%;%PATH%&#x0D;&#x0A;
set PYTHONPATH=$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin;$(BASE_GI_DIR)&#x0D;&#x0A;
set UNINSTALLED_INTROSPECTION_SRCDIR=$(BASE_GI_DIR)&#x0D;&#x0A;
python ..\tools\g-ir-scanner --verbose -I. --add-include-path=..\ --add-include-path=..\gir --generate-typelib-tests=Everything,everything.h,everything.c&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
:DONE_GEN_EVERYTHING_C&#x0D;&#x0A;
			  "
	/>
	<UserMacro
		Name="GenerateGIR"
		Value="
@echo off&#x0D;&#x0A;
set CC=cl&#x0D;&#x0A;
if &quot;$(MINGWDIR)&quot; == &quot;&quot; goto ERR_NOGCC&#x0D;&#x0A;
if &quot;$(PYTHONDIR)&quot; == &quot;&quot; goto ERR_NOPYPATH&#x0D;&#x0A;
if &quot;$(PKG_CONFIG_PATH)&quot; == &quot;&quot; goto ERR_NOPKGCONFIG&#x0D;&#x0A;

set PYTHONPATH=$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin;$(BASE_GI_DIR)&#x0D;&#x0A;
set UNINSTALLED_INTROSPECTION_SRCDIR=$(BASE_GI_DIR)&#x0D;&#x0A;
set PATH=$(GlibEtcInstallRoot)\bin;$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin;$(PATH);$(PYTHONDIR);$(MINGWDIR)\bin&#x0D;&#x0A;
set LIB=$(GlibEtcInstallRoot)\lib;$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin;$(LIB);$(PYTHONDIR)\libs&#x0D;&#x0A;
set INCLUDE=$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(INCLUDE);$(PYTHONDIR)\include&#x0D;&#x0A;

set PLAT=$(PlatformName)&#x0D;&#x0A;
set CONF=$(ConfigurationName)&#x0D;&#x0A;
set BASEDIR=$(GlibEtcInstallRoot)&#x0D;&#x0A;
set VSVER=$(VSVER)&#x0D;&#x0A;

cd ..&#x0D;&#x0A;
call gengir.bat&#x0D;&#x0A;
cd .\vs$(VSVER)&#x0D;&#x0A;
goto DONE&#x0D;&#x0A;

:ERR_NOGCC&#x0D;&#x0A;
echo You need a Windows GCC installation to preprocess the headers to generate .gir files&#x0D;&#x0A;
echo Please set MINGWDIR accordingly before launching the Project&#x0D;&#x0A;
goto DONE&#x0D;&#x0A;

:ERR_NOPYPATH&#x0D;&#x0A;
echo You need a Python installation to build the Python module and run the Python scripts to generate .gir files&#x0D;&#x0A;
echo The Python installation needs to correspond to the configuration of your build, i.e. Win32 or x64&#x0D;&#x0A;
echo Please set PYTHONDIR accordingly before launching the Project&#x0D;&#x0A;
goto DONE&#x0D;&#x0A;

:ERR_NOPKGCONFIG&#x0D;&#x0A;
echo You need pkg-config and need to set PKG_CONFIG_PATH to point to pkgconfig (.pc) files to generate .gir files&#x0D;&#x0A;
echo Please set PKG_CONFIG_PATH accordingly before launching the Project&#x0D;&#x0A;
goto DONE&#x0D;&#x0A;

:DONE&#x0D;&#x0A;
			  "
	/>
	<UserMacro
		Name="LibGILibtoolCompatibleDllPrefix"
		Value="lib"
	/>
	<UserMacro
		Name="LibGILibtoolCompatibleDllSuffix"
		Value="-$(GIApiVersion)-0"
	/>
	<UserMacro
		Name="LibGISeparateVS9DllPrefix"
		Value=""
	/>
	<UserMacro
		Name="LibGISeparateVS9DllSuffix"
		Value="-1-vs9"
	/>
	<!-- Change these two to LibGILibtoolCompatibleDllPrefix and
	LibGILibtoolCompatibleDllSuffix if that is what you want -->
	<UserMacro
		Name="LibGIDllPrefix"
		Value="$(LibGISeparateVS9DllPrefix)"
	/>
	<UserMacro
		Name="LibGIDllSuffix"
		Value="$(LibGISeparateVS9DllSuffix)"
	/>
	<UserMacro
		Name="GIDoInstall"
		Value="
mkdir $(CopyDir)&#x0D;&#x0A;
mkdir $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(LibGIDllPrefix)girepository$(LibGIDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\g-ir-compiler.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\g-ir-generate.exe $(CopyDir)\bin&#x0D;&#x0A;
copy ..\..\..\tools\g-ir-annotation-tool $(CopyDir)\bin&#x0D;&#x0A;
copy ..\..\..\tools\g-ir-doc-tool $(CopyDir)\bin&#x0D;&#x0A;
copy ..\..\..\tools\g-ir-scanner $(CopyDir)\bin&#x0D;&#x0A;

#include "gir.vs9.install"

copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;

mkdir $(CopyDir)\share\gir-$(GIApiVersion)&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\share\gir-$(GIApiVersion)\*.gir $(CopyDir)\share\gir-$(GIApiVersion)&#x0D;&#x0A;

mkdir $(CopyDir)\share\gobject-introspection-$(GIApiVersion)&#x0D;&#x0A;
copy ..\..\..\girepository\gdump.c $(CopyDir)\share\gobject-introspection-$(GIApiVersion)&#x0D;&#x0A;

mkdir $(CopyDir)\lib\girepository-$(GIApiVersion)&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\girepository-$(GIApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\lib\girepository-$(GIApiVersion)\*.typelib $(CopyDir)\lib\girepository-$(GIApiVersion)&#x0D;&#x0A;
"
	/>
</VisualStudioPropertySheet>