Permalink
Browse files

start installing agg headers so that c++ programs using mapnik can us…

…e more of the mapnik api - closes #1383
  • Loading branch information...
1 parent 352ad74 commit a56c63bed1ff9aaee6ef808a3bf5398546a0cbe1 @springmeyer springmeyer committed Aug 28, 2012
Showing with 16 additions and 5 deletions.
  1. +12 −2 deps/agg/build.py
  2. +2 −2 include/build.py
  3. +1 −0 utils/mapnik-config/build.py
  4. +1 −1 utils/mapnik-config/mapnik-config.template.sh
View
14 deps/agg/build.py
@@ -17,7 +17,8 @@
#
#
-import glob
+import os
+from glob import glob
Import('env')
@@ -28,4 +29,13 @@
else:
cxxflags = env['CUSTOM_CXXFLAGS'] + ' -O%s -fPIC -DNDEBUG' % env['OPTIMIZATION']
-agg_env.StaticLibrary('agg', glob.glob('./src/' + '*.cpp'), LIBS=[], CXXFLAGS=cxxflags, LINKFLAGS=env['CUSTOM_LDFLAGS'])
+agg_env.StaticLibrary('agg', glob('./src/' + '*.cpp'), LIBS=[], CXXFLAGS=cxxflags, LINKFLAGS=env['CUSTOM_LDFLAGS'])
+
+if 'install' in COMMAND_LINE_TARGETS:
+ inc_target = os.path.normpath(env['INSTALL_PREFIX']+'/include/mapnik/agg')
+ # TODO - restrict to just agg headers used in mapnik includes?
+ includes = glob('./include/*.h')
+ # just for kicks wait till libmapnik is built to install headers
+ target = env.Install(inc_target, includes)
+ Depends(target, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
+ env.Alias(target='install', source=target)
View
4 include/build.py
@@ -3,7 +3,7 @@
Import('env')
-base = '../include/mapnik/'
+base = './mapnik/'
subdirs = ['svg','wkt','grid','json','util']
#if env['SVG_RENDERER']:
@@ -13,7 +13,7 @@
if 'install' in COMMAND_LINE_TARGETS:
- includes = glob('../include/mapnik/*.hpp')
+ includes = glob('./mapnik/*.hpp')
for subdir in subdirs:
pathdir = os.path.join(base,subdir,'*.hpp')
View
1 utils/mapnik-config/build.py
@@ -28,6 +28,7 @@
CONFIG_FONTS='%(fonts)s'
CONFIG_INPUT_PLUGINS='%(input_plugins)s'
CONFIG_GIT_REVISION='%(git_revision)s'
+CONFIG_MAPNIK_AGG_INCLUDE=${CONFIG_PREFIX}/include/mapnik/agg
'''
View
2 utils/mapnik-config/mapnik-config.template.sh
@@ -90,7 +90,7 @@ while test $# -gt 0; do
;;
--cflags)
- echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_OTHER_INCLUDES}
+ echo -I${CONFIG_MAPNIK_INCLUDE} -I${CONFIG_MAPNIK_AGG_INCLUDE} ${CONFIG_OTHER_INCLUDES}
;;
--libs)

0 comments on commit a56c63b

Please sign in to comment.