SubDir TOP apps tools basemapgen ;

Description basemapgen : "Terrain basemap generator" ;
Application basemapgen : [ Wildcard *.cpp *.h ] : console ;
LinkWith basemapgen : crystalspace ;
FileListEntryApplications basemapgen : app-tool ;

if [ Property build : projgen_version ] != 6
{

Description basemapgen_static : "Terrain basemap generator (static build)" ;

SubVariant static ;

Application basemapgen_static : [ Wildcard *.cpp *.h ] :
  console independent noinstall nohelp ;
CFlags basemapgen_static : [ FDefines CS_STATIC_LINKED ] ;

LinkWith basemapgen_static : crystalspace ;

BASEMAPGEN.PLUGINLIST =
  bindoc
  bruteblock
  csbmpimg
  csddsimg
  csgifimg
  csparser
  cssynldr
  dsplex
  imgplex
  null2d
  null3d
  simpleformer
  simpleformerldr
  terrainldr
  terrain2
  terrain2ldr
  xmltiny
  ;

if $(ZLIB.AVAILABLE) = "yes"
{
  BASEMAPGEN.PLUGINLIST += vfs ;
}
if $(JPEG.AVAILABLE) = "yes"
{
  BASEMAPGEN.PLUGINLIST += csjpgimg ;
}
if $(PNG.AVAILABLE) = "yes"
{
  BASEMAPGEN.PLUGINLIST += cspngimg ;
}

LinkStaticPlugins basemapgen_static : $(BASEMAPGEN.PLUGINLIST) ;
FileListEntryApplications basemapgen_static : app-tool-static ;
SubVariant ;
}
