-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmapnik-config.bat.template
202 lines (165 loc) · 4.62 KB
/
mapnik-config.bat.template
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
@echo off
SET EL=0
set MAPNIK_VERSION={{MAPNIK_VERSION}}
set MAPNIK_VERSION_NUMBER={{MAPNIK_VERSION_NUMBER}}
::SET CUR_PATH=%CD%
::cd %CD%/../
set MAPNIK_PREFIX=%~dp0
:: strip trailing \
set MAPNIK_PREFIX=%MAPNIK_PREFIX:~0,-1%
:: get dirname
for %%F in (%MAPNIK_PREFIX%) do set MAPNIK_PREFIX=%%~dpF
:: strip trailing \
set MAPNIK_PREFIX=%MAPNIK_PREFIX:~0,-1%
:: now make double \\ for gyp
set MAPNIK_PREFIX=%MAPNIK_PREFIX:\=\\%
set MAPNIK_LIBS=%MAPNIK_PREFIX%\\lib
set MAPNIK_INCLUDES=%MAPNIK_PREFIX%\\include
set MAPNIK_INPUT_PLUGINS_DIRECTORY=%MAPNIK_PREFIX%\\lib\\mapnik\\input
set MAPNIK_FONTS_DIRECTORY=%MAPNIK_PREFIX%\\lib\\mapnik\\fonts
if /i "%1"=="" (
SET EL=1
goto help_msg
)
:Loop
IF "%1"=="" GOTO Continue
if /i "%1"=="-v" (
echo %MAPNIK_VERSION%
goto exit
)
if /i "%1"=="--version" (
echo %MAPNIK_VERSION%
goto exit
)
if /i "%1"=="--version-number" (
echo %MAPNIK_VERSION_NUMBER%
goto exit
)
if /i "%1"=="--git-revision" (
echo {{GIT_REVISION}}
goto exit
)
if /i "%1"=="--git-describe" (
echo {{GIT_DESCRIBE}}
goto exit
)
if /i "%1"=="help" (
goto help_msg
)
if /i "%1"=="--help" (
goto help_msg
)
if /i "%1"=="-help" (
goto help_msg
)
if /i "%1"=="-h" (
goto help_msg
)
if /i "%1"=="/help" (
goto help_msg
)
if /i "%1"=="?" (
goto help_msg
)
if /i "%1"=="-?" (
goto help_msg
)
if /i "%1"=="--?" (
goto help_msg
)
if /i "%1"=="/?" (
goto help_msg
)
set hit=""
if /i "%1"=="--prefix" (
echo %MAPNIK_PREFIX%
set hit=%1
)
if /i "%1"=="--input-plugins" (
echo %MAPNIK_INPUT_PLUGINS_DIRECTORY%
set hit=%1
)
if /i "%1"=="--fonts" (
echo %MAPNIK_FONTS_DIRECTORY%
set hit=%1
)
if /i "%1"=="--lib-name" (
echo mapnik
set hit=%1
)
if /i "%1"=="--libs" (
echo mapnik.lib
set hit=%1
)
@rem TODO - figure out how to avoid hardcoding these library names
if /i "%1"=="--dep-libs" (
echo {{DEP_LIBS}}
set hit=%1
)
if /i "%1"=="--ldflags" (
echo %MAPNIK_LIBS%
set hit=%1
)
if /i "%1"=="--defines" (
echo _WINDOWS WIN32_LEAN_AND_MEAN BOOST_REGEX_HAS_ICU BOOST_SPIRIT_USE_PHOENIX_V3=1 BOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 BIGINT HAVE_JPEG MAPNIK_USE_PROJ4 MAPNIK_NO_ATEXIT HAVE_PNG HAVE_TIFF HAVE_WEBP MAPNIK_THREADSAFE HAVE_CAIRO GRID_RENDERER SVG_RENDERER
set hit=%1
)
@rem /MD is multithreaded dynamic linking - http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
@rem /EHsc is to support c++ exceptions - http://msdn.microsoft.com/en-us/library/1deeycx5(v=vs.80).aspx
@rem /GR is to support rtti (runtime type detection) - http://msdn.microsoft.com/en-us/library/we6hfdy0.aspx
if /i "%1"=="--cxxflags" (
echo /MD /EHsc /GR
set hit=%1
)
if /i "%1"=="--includes" (
echo %MAPNIK_INCLUDES% %MAPNIK_INCLUDES%\\mapnik\\agg
set hit=%1
)
if /i "%1"=="--all-flags" (
@rem nothing here yet
echo ""
set hit=%1
)
if /i "%1"=="--cxx" (
@rem nothing here yet
echo ""
set hit=%1
)
if /i "%1"=="--cflags" (
@rem nothing here yet
echo ""
set hit=%1
)
if /i "%1"=="--dep-includes" (
@rem nothing here yet
echo %MAPNIK_INCLUDES%\\cairo %MAPNIK_INCLUDES%\\freetype2 %MAPNIK_INCLUDES%\\google %MAPNIK_INCLUDES%\\libxml2
set hit=%1
)
@rem if we got here print warning
if /i NOT %1==%hit% (
echo unknown option %1 1>&2
SET EL=1
)
SHIFT
GOTO Loop
:Continue
goto exit
:help_msg
echo Usage: mapnik-config
echo Examples:
echo -h --help : display this help and exit
echo -v --version : version information (MAPNIK_VERSION_STRING)
echo --version-number : version number (MAPNIK_VERSION) (new in 2.2.0)
echo --git-revision : git hash from "git rev-list --max-count=1 HEAD"
echo --git-describe : git decribe output (new in 2.2.0)
echo --libs : provide lib name for mapnik.dll
echo --defines : provide compiler defines needed for this mapnik build
echo --dep-libs : provide lib names of depedencies
echo --ldflags : provide lib paths to depedencies
echo --cxxflags : provide compiler flags
echo --includes : provide header paths for mapnik
echo --dep-includes : provide header paths for dependencies
echo --input-plugins : provide path to input plugins directory
echo --fonts : provide path to fonts directory
:EXIT
exit /b %EL%