rundemo.gyp now working on windows

This commit is contained in:
Dane Springmeyer 2013-05-23 00:46:55 -07:00
parent bd6ca681b6
commit 47e62804be
3 changed files with 15 additions and 7 deletions

View file

@ -67,10 +67,15 @@ On OS X you can also create an xcode project:
### Windows ### Windows
First you need to build he visual studio files with gyp: First you need to build the visual studio solution with gyp:
gyp rundemo.gyp --depth=. -f msvs -G msvs_version=2010 gyp rundemo.gyp --depth=. -f msvs -G msvs_version=2010
Then you can compile the demo with `msbuild`: Then you can compile with `msbuild`:
msbuild build.sln msbuild rundemo.sln /p:Configuration="Release" /p:Platform=Win32
Then run it!
for /f %i in ('mapnik-config --prefix') do set MAPNIK_PREFIX=%%i
Release\rundemo.exe %MAPNIK_PREFIX%

View file

@ -1,5 +1,6 @@
{ {
'includes': [ 'common.gypi' ], 'includes': [ 'common.gypi' ],
'default_configuration': 'Release',
'targets': [ 'targets': [
{ {
'target_name': 'rundemo', 'target_name': 'rundemo',
@ -34,9 +35,11 @@
'<!@(mapnik-config --dep-includes)', '<!@(mapnik-config --dep-includes)',
], ],
'msvs_settings': { 'msvs_settings': {
'AdditionalLibraryDirectories': [ 'VCLinkerTool': {
'<!@(mapnik-config --ldflags)' 'AdditionalLibraryDirectories': [
], '<!@(mapnik-config --ldflags)'
]
}
} }
}] }]
] ]

View file

@ -19,7 +19,7 @@ if /i "%1"=="/?" goto help
if /i "%1"=="--prefix" echo %MAPNIK_PREFIX% if /i "%1"=="--prefix" echo %MAPNIK_PREFIX%
if /i "%1"=="--libs" echo mapnik.lib if /i "%1"=="--libs" echo mapnik.lib
@rem TODO - figure out how to avoid hardcoding these library names @rem TODO - figure out how to avoid hardcoding these library names
if /i "%1"=="--dep-libs" echo icuuc.lib icuin.lib libboost_system-vc100-mt-s-1_49.lib if /i "%1"=="--dep-libs" echo icuuc.lib icuin.lib cairo.lib libboost_system-vc100-mt-s-1_49.lib
if /i "%1"=="--ldflags" echo %MAPNIK_LIBS% if /i "%1"=="--ldflags" echo %MAPNIK_LIBS%
if /i "%1"=="--defines" echo _WINDOWS HAVE_JPEG HAVE_PNG HAVE_TIFF MAPNIK_USE_PROJ4 BOOST_REGEX_HAS_ICU MAPNIK_THREADSAFE BIGINT HAVE_LIBXML2 HAVE_CAIRO if /i "%1"=="--defines" echo _WINDOWS HAVE_JPEG HAVE_PNG HAVE_TIFF MAPNIK_USE_PROJ4 BOOST_REGEX_HAS_ICU MAPNIK_THREADSAFE BIGINT HAVE_LIBXML2 HAVE_CAIRO
@rem /MD is multithreaded dynamic linking - http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx @rem /MD is multithreaded dynamic linking - http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx