spruce up mapnik-config.bat

This commit is contained in:
Dane Springmeyer 2014-08-31 20:09:39 -07:00
parent cfe79a6fe3
commit 72ca8d6faa

View file

@ -19,169 +19,166 @@ set MAPNIK_INPUT_PLUGINS_DIRECTORY=%MAPNIK_PREFIX%\\libs\\mapnik\\input
set MAPNIK_FONTS_DIRECTORY=%MAPNIK_PREFIX%\\libs\\mapnik\\fonts set MAPNIK_FONTS_DIRECTORY=%MAPNIK_PREFIX%\\libs\\mapnik\\fonts
if /i "%1"=="" ( if /i "%1"=="" (
goto help goto help_msg_err
goto exit_error
) )
if /i "%1"=="-v" ( :Loop
echo %MAPNIK_VERSION% IF "%1"=="" GOTO Continue
goto exit_ok
)
if /i "%1"=="--version" ( if /i "%1"=="-v" (
echo %MAPNIK_VERSION% echo %MAPNIK_VERSION%
goto exit_ok goto exit_ok
) )
if /i "%1"=="--version-number" ( if /i "%1"=="--version" (
echo %MAPNIK_VERSION_NUMBER% echo %MAPNIK_VERSION%
goto exit_ok goto exit_ok
) )
if /i "%1"=="--git-revision" ( if /i "%1"=="--version-number" (
echo TODO echo %MAPNIK_VERSION_NUMBER%
goto exit_ok goto exit_ok
) )
if /i "%1"=="--git-describe" ( if /i "%1"=="--git-revision" (
echo TODO echo TODO
goto exit_ok goto exit_ok
) )
if /i "%1"=="help" ( if /i "%1"=="--git-describe" (
goto help echo TODO
goto exit_ok goto exit_ok
) )
if /i "%1"=="--help" ( if /i "%1"=="help" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="-help" ( if /i "%1"=="--help" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="-h" ( if /i "%1"=="-help" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="/help" ( if /i "%1"=="-h" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="?" ( if /i "%1"=="/help" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="-?" ( if /i "%1"=="?" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="--?" ( if /i "%1"=="-?" (
goto help goto help_msg
goto exit_ok )
)
if /i "%1"=="/?" ( if /i "%1"=="--?" (
goto help goto help_msg
goto exit_ok )
)
set hit="" if /i "%1"=="/?" (
goto help_msg
)
if /i "%1"=="--prefix" ( set hit=""
echo %MAPNIK_PREFIX%
set hit="yes"
)
if /i "%1"=="--input-plugins" ( if /i "%1"=="--prefix" (
echo %MAPNIK_INPUT_PLUGINS_DIRECTORY% echo %MAPNIK_PREFIX%
set hit="yes" set hit=%1
) )
if /i "%1"=="--fonts" ( if /i "%1"=="--input-plugins" (
echo %MAPNIK_FONTS_DIRECTORY% echo %MAPNIK_INPUT_PLUGINS_DIRECTORY%
set hit="yes" set hit=%1
) )
if /i "%1"=="--lib-name" ( if /i "%1"=="--fonts" (
echo mapnik echo %MAPNIK_FONTS_DIRECTORY%
set hit="yes" set hit=%1
) )
if /i "%1"=="--libs" ( if /i "%1"=="--lib-name" (
echo mapnik.lib echo mapnik
set hit="yes" set hit=%1
) )
@rem TODO - figure out how to avoid hardcoding these library names if /i "%1"=="--libs" (
if /i "%1"=="--dep-libs" ( echo mapnik.lib
echo libpng16.lib zlib.lib harfbuzz.lib libwebp_dll.lib libjpeg.lib icuuc.lib icuin.lib cairo.lib libboost_system-vc140-mt-1_56.lib libxml2_a.lib ws2_32.lib set hit=%1
set hit="yes" )
)
if /i "%1"=="--ldflags" ( @rem TODO - figure out how to avoid hardcoding these library names
echo %MAPNIK_LIBS% if /i "%1"=="--dep-libs" (
set hit="yes" echo libpng16.lib zlib.lib harfbuzz.lib libwebp_dll.lib libjpeg.lib icuuc.lib icuin.lib cairo.lib libboost_system-vc140-mt-1_56.lib libxml2_a.lib ws2_32.lib
) set hit=%1
)
if /i "%1"=="--defines" ( if /i "%1"=="--ldflags" (
echo _WINDOWS BOOST_ALL_NO_LIB BOOST_LIB_TOOLSET="vc140" BOOST_COMPILER="14.0" BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES HAVE_JPEG HAVE_PNG HAVE_WEBP HAVE_TIFF MAPNIK_USE_PROJ4 BOOST_REGEX_HAS_ICU GRID_RENDERER SVG_RENDERER MAPNIK_THREADSAFE BIGINT HAVE_LIBXML2 HAVE_CAIRO LIBXML_STATIC echo %MAPNIK_LIBS%
set hit="yes" set hit=%1
) )
@rem /MD is multithreaded dynamic linking - http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx if /i "%1"=="--defines" (
@rem /EHsc is to support c++ exceptions - http://msdn.microsoft.com/en-us/library/1deeycx5(v=vs.80).aspx echo _WINDOWS BOOST_ALL_NO_LIB BOOST_LIB_TOOLSET="vc140" BOOST_COMPILER="14.0" BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES HAVE_JPEG HAVE_PNG HAVE_WEBP HAVE_TIFF MAPNIK_USE_PROJ4 BOOST_REGEX_HAS_ICU GRID_RENDERER SVG_RENDERER MAPNIK_THREADSAFE BIGINT HAVE_LIBXML2 HAVE_CAIRO LIBXML_STATIC
@rem /GR is to support rtti (runtime type detection) - http://msdn.microsoft.com/en-us/library/we6hfdy0.aspx set hit=%1
if /i "%1"=="--cxxflags" ( )
echo /MD /EHsc /GR
set hit="yes"
)
if /i "%1"=="--includes" ( @rem /MD is multithreaded dynamic linking - http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
echo %MAPNIK_INCLUDES% %MAPNIK_INCLUDES%\\mapnik\\agg @rem /EHsc is to support c++ exceptions - http://msdn.microsoft.com/en-us/library/1deeycx5(v=vs.80).aspx
set hit="yes" @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"=="--all-flags" ( if /i "%1"=="--includes" (
@rem nothing here yet echo %MAPNIK_INCLUDES% %MAPNIK_INCLUDES%\\mapnik\\agg
echo "" set hit=%1
set hit="yes" )
)
if /i "%1"=="--cxx" ( if /i "%1"=="--all-flags" (
@rem nothing here yet @rem nothing here yet
echo "" echo ""
set hit="yes" set hit=%1
) )
if /i "%1"=="--cflags" ( if /i "%1"=="--cxx" (
@rem nothing here yet @rem nothing here yet
echo "" echo ""
set hit="yes" set hit=%1
) )
if /i "%1"=="--dep-includes" ( if /i "%1"=="--cflags" (
@rem nothing here yet @rem nothing here yet
echo %MAPNIK_INCLUDES%\\cairo %MAPNIK_INCLUDES%\\freetype2 %MAPNIK_INCLUDES%\\google %MAPNIK_INCLUDES%\\libxml2 echo ""
set hit="yes" 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
)
SHIFT
GOTO Loop
:Continue
@rem if we got here print warning
if /i %hit%=="" (
echo unknown option %1 1>&2
)
goto exit_ok goto exit_ok
:help :help_msg
echo Usage: mapnik-config echo Usage: mapnik-config
echo Examples: echo Examples:
echo --libs : provide lib name for mapnik.dll echo --libs : provide lib name for mapnik.dll
echo --defines : provide compiler defines needed for this mapnik build echo --defines : provide compiler defines needed for this mapnik build
@ -192,12 +189,26 @@ echo --includes : provide header paths for mapnik
echo --dep-includes : provide header paths for dependencies echo --dep-includes : provide header paths for dependencies
echo --input-plugins : provide path to input plugins directory echo --input-plugins : provide path to input plugins directory
echo --fonts : provide path to fonts directory echo --fonts : provide path to fonts directory
goto exit_ok
:help_msg_err
echo Usage: mapnik-config
echo Examples:
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
goto exit_error
:exit_error :exit_error
@rem exit /b 1 exit /b 1
goto :EOF goto :EOF
:exit_ok :exit_ok
@rem exit /b 0 exit /b 0
goto :EOF goto :EOF