geostat/meson.build

30 wiersze
1.4 KiB
Meson

project('geostat', 'cpp', default_options : ['cpp_std=c++2a'])
curl_dep = dependency('libcurl')
json_dep = dependency('nlohmann_json')
sqlite_dep = dependency('sqlite3')
gpx_dep = dependency('gpxlib')
magick_dep = dependency('Magick++', required : false)
if not magick_dep.found()
magick_dep = dependency('GraphicsMagick++', required : false)
add_global_arguments('-Dgraphicsmagick', language : 'cpp')
endif
if not magick_dep.found()
error('ImageMagick++ or GraphicsMagick++ not found.')
endif
link = ['-lheatmap']
src = ['geostat.cpp', 'okapi.cpp', 'cache.cpp', 'debug.cpp', 'heat.cpp', 'ocdb.cpp', 'common.cpp', 'region.cpp']
src_cli = ['geostat_cli.cpp', 'okapi.cpp', 'gpx.cpp', 'cache.cpp', 'debug.cpp', 'heat.cpp', 'ocdb.cpp', 'common.cpp']
src_db = ['geodb.cpp', 'debug.cpp', 'ocdb.cpp', 'okapi.cpp', 'cache.cpp', 'common.cpp']
executable('geostat', src, dependencies : [curl_dep, json_dep, magick_dep, sqlite_dep], link_args: link, install: true)
executable('geostat_cli', src_cli, dependencies : [curl_dep, json_dep, magick_dep, sqlite_dep, gpx_dep], link_args: link, install: true)
executable('geodb', src_db, dependencies : [sqlite_dep, json_dep, curl_dep], install: true)
configure_file(input: 'rating-star.png', output: '@PLAINNAME@', copy: true, install: true, install_dir: '.')
configure_file(input: 'geo.css', output: '@PLAINNAME@', copy: true, install: true, install_dir: '.')
subdir('maps')
subdir('geojson')