Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first stab as node-gyp based build

  • Loading branch information...
commit 4ad5b33b0e68bda1815f08c94f9652be56dda436 1 parent 95e1d57
@springmeyer springmeyer authored
Showing with 35 additions and 5 deletions.
  1. +30 −5 binding.gyp
  2. +5 −0 mapnik-config.bat
View
35 binding.gyp
@@ -6,17 +6,42 @@
'cflags_cc!': ['-O3', '-DNDEBUG'],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS!':['-O3', '-DNDEBUG']
- }
+ },
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'ExceptionHandling': 1,
+ }
+ }
},
- 'Release': {
- # nothing needed, use defaults
+ 'Release': {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'ExceptionHandling': 1,
+ },
+ 'VCLinkerTool': {
+ 'AdditionalOptions': [
+ # https://github.com/mapnik/node-mapnik/issues/74
+ '/FORCE:MULTIPLE'
+ ],
+ 'AdditionalLibraryDirectories': [
+ #http://stackoverflow.com/questions/757418/should-i-compile-with-md-or-mt
+ '<!@(mapnik-config --dep-libpaths)'
+ ],
+ },
}
+ }
},
'include_dirs': [
'./src'
],
'conditions': [
- ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or OS=="mac"', {
+ ['OS=="win"', {
+ 'include_dirs':['<!@(mapnik-config --includes)'],
+ 'defines': ['<!@(mapnik-config --defines)'],
+ 'libraries': ['<!@(mapnik-config --libs)'],
+ 'msvs_disabled_warnings': [ 4244,4005,4506,4345,4804 ],
+ }],
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or OS=="mac"', {
'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
'cflags_cc' : ['<!@(mapnik-config --cflags)'],
'libraries':[
@@ -65,7 +90,7 @@
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
- }
+ },
}
]
}
View
5 mapnik-config.bat
@@ -0,0 +1,5 @@
+@echo off
+if /i "%1"=="--libs" echo c:\\dev2\\mapnik-packaging\\windows\\build\\src\\msvc-10.0\\release\\threading-multi\\mapnik.lib icuuc.lib icuin.lib libboost_system-vc100-mt-s-1_49
+if /i "%1"=="--dep-libpaths" echo c:\\dev2\\icu\\lib\\ c:\\dev2\\boost-49-vc100\\lib\\
+if /i "%1"=="--defines" echo HAVE_JPEG HAVE_PNG HAVE_TIFF MAPNIK_USE_PROJ4 BOOST_REGEX_HAS_ICU MAPNIK_THREADSAFE BIGINT HAVE_LIBXML2 HAVE_CAIRO PLATFORM="win32" _WINDOWS __WINDOWS__
+if /i "%1"=="--includes" echo c:\\mapnik-2.0\\include c:\\mapnik-2.0\\include\\mapnik\\agg c:\\dev2\\boost-49-vc100\\include\\boost-1_49 c:\\dev2\\icu\\include c:\\dev2\\cairo c:\\dev2\\cairo\\src c:\\dev2\\freetype c:\\dev2\\freetype\\include
Please sign in to comment.
Something went wrong with that request. Please try again.