|
Packit Service |
4897fc |
project('libgweather', 'c',
|
|
Packit Service |
4897fc |
version: '3.28.2',
|
|
Packit Service |
4897fc |
meson_version: '>= 0.43.0',
|
|
Packit Service |
4897fc |
)
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
libgweather_version = meson.project_version().split('.')
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
# We use libtool-version numbers because it's easier to understand.
|
|
Packit Service |
4897fc |
# Before making a release, the libgweather_so_*
|
|
Packit Service |
4897fc |
# numbers should be modified. The components are of the form C:R:A.
|
|
Packit Service |
4897fc |
# a) If binary compatibility has been broken (eg removed or changed interfaces)
|
|
Packit Service |
4897fc |
# change to C+1:0:0.
|
|
Packit Service |
4897fc |
# b) If interfaces have been changed or added, but binary compatibility has
|
|
Packit Service |
4897fc |
# been preserved, change to C+1:0:A+1
|
|
Packit Service |
4897fc |
# c) If the interface is the same as the previous version, change to C:R+1:A
|
|
Packit Service |
4897fc |
libgweather_lt_c=15
|
|
Packit Service |
4897fc |
libgweather_lt_r=0
|
|
Packit Service |
4897fc |
libgweather_lt_a=0
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
# convert to soname
|
|
Packit Service |
4897fc |
libgweather_so_version = '@0@.@1@.@2@'.format((libgweather_lt_c - libgweather_lt_a),
|
|
Packit Service |
4897fc |
libgweather_lt_a, libgweather_lt_r)
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
pkgconfig = import('pkgconfig')
|
|
Packit Service |
4897fc |
gnome = import('gnome')
|
|
Packit Service |
4897fc |
i18n = import('i18n')
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
prefix = get_option('prefix')
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
bindir = join_paths(prefix, get_option('bindir'))
|
|
Packit Service |
4897fc |
datadir = join_paths(prefix, get_option('datadir'))
|
|
Packit Service |
4897fc |
libdir = join_paths(prefix, get_option('libdir'))
|
|
Packit Service |
4897fc |
includedir = join_paths(prefix, get_option('includedir'))
|
|
Packit Service |
4897fc |
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
|
Packit Service |
4897fc |
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
|
Packit Service |
4897fc |
pkgdatadir = join_paths(datadir, 'libgweather')
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
glib_req_version = '>= 2.35.1'
|
|
Packit Service |
4897fc |
gtk_req_version = '>= 3.13.5'
|
|
Packit Service |
4897fc |
libsoup_req_version = '>= 2.44.0'
|
|
Packit Service |
4897fc |
libxml_req_version = '>= 2.6.0'
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
c_compiler = meson.get_compiler('c')
|
|
Packit Service |
4897fc |
gtk_dep = dependency('gtk+-3.0', version: gtk_req_version)
|
|
Packit Service |
4897fc |
glib_dep = dependency('gio-2.0', version: glib_req_version)
|
|
Packit Service |
4897fc |
libsoup_dep = dependency('libsoup-2.4', version: libsoup_req_version)
|
|
Packit Service |
4897fc |
libxml_dep = dependency('libxml-2.0', version: libxml_req_version)
|
|
Packit Service |
4897fc |
geocode_glib_dep = dependency('geocode-glib-1.0')
|
|
Packit Service |
4897fc |
math_dep = c_compiler.find_library('m', required : false)
|
|
Packit Service |
4897fc |
deps_libgweather = [math_dep, gtk_dep, glib_dep, libsoup_dep, libxml_dep, geocode_glib_dep]
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
config_h = configuration_data()
|
|
Packit Service |
4897fc |
GETTEXT_PACKAGE = 'libgweather-3.0'
|
|
Packit Service |
4897fc |
config_h.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE)
|
|
Packit Service |
4897fc |
config_h.set_quoted('LOCALEDIR', join_paths(datadir, 'locale'))
|
|
Packit Service |
4897fc |
config_h.set_quoted('GNOMELOCALEDIR', join_paths(datadir, 'locale'))
|
|
Packit Service |
4897fc |
config_h.set_quoted('G_LOG_DOMAIN', 'GWeather')
|
|
Packit Service |
4897fc |
config_h.set_quoted('GWEATHER_XML_LOCATION_DIR', pkgdatadir)
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
if c_compiler.has_member('struct tm', 'tm_gmtoff', prefix: '#include <time.h>')
|
|
Packit Service |
4897fc |
config_h.set('HAVE_TM_TM_GMOFF', 1)
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
if c_compiler.has_header_symbol('time.h', 'timezone')
|
|
Packit Service |
4897fc |
config_h.set('HAVE_TIMEZONE', 1)
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
if c_compiler.has_header_symbol('langinfo.h', '_NL_MEASUREMENT_MEASUREMENT')
|
|
Packit Service |
4897fc |
config_h.set('HAVE__NL_MEASUREMENT_MEASUREMENT', 1)
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
config_h.set_quoted('ZONEINFO_DIR', get_option('zoneinfo_dir'))
|
|
Packit Service |
4897fc |
config_h.set_quoted('OWM_APIKEY', get_option('owm_apikey'))
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
if get_option('default_library') != 'static'
|
|
Packit Service |
4897fc |
if host_machine.system() == 'windows'
|
|
Packit Service |
4897fc |
config_h.set('DLL_EXPORT', true)
|
|
Packit Service |
4897fc |
config_h.set('GWEATHER_EXTERN', '__declspec(dllexport) extern')
|
|
Packit Service |
4897fc |
if cc.get_id() != 'msvc'
|
|
Packit Service |
4897fc |
add_project_arguments(['-fvisibility=hidden'], language: 'c')
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
else
|
|
Packit Service |
4897fc |
config_h.set('GWEATHER_EXTERN', '__attribute__((visibility("default"))) extern')
|
|
Packit Service |
4897fc |
add_project_arguments(['-fvisibility=hidden'], language: 'c')
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
configure_file(
|
|
Packit Service |
4897fc |
output: 'config.h',
|
|
Packit Service |
4897fc |
configuration: config_h,
|
|
Packit Service |
4897fc |
)
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
if get_option('glade_catalog') == 'false'
|
|
Packit Service |
4897fc |
enable_glade_catalog = false
|
|
Packit Service |
4897fc |
else
|
|
Packit Service |
4897fc |
glade_dep = dependency('gladeui-2.0', required: (get_option('glade_catalog') == 'true'))
|
|
Packit Service |
4897fc |
enable_glade_catalog = glade_dep.found()
|
|
Packit Service |
4897fc |
if enable_glade_catalog
|
|
Packit Service |
4897fc |
glade_catalogdir = join_paths(datadir, 'glade', 'catalogs')
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
enable_vala = get_option('enable_vala')
|
|
Packit Service |
4897fc |
if enable_vala == 'auto'
|
|
Packit Service |
4897fc |
enable_vala = find_program('vapigen', required: false).found()
|
|
Packit Service |
4897fc |
else
|
|
Packit Service |
4897fc |
enable_vala = enable_vala != 'false'
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
root_inc = include_directories('.')
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
subdir('libgweather')
|
|
Packit Service |
4897fc |
subdir('data')
|
|
Packit Service |
4897fc |
subdir('schemas')
|
|
Packit Service |
4897fc |
if get_option('gtk_doc')
|
|
Packit Service |
4897fc |
subdir('doc')
|
|
Packit Service |
4897fc |
endif
|
|
Packit Service |
4897fc |
subdir('po')
|
|
Packit Service |
4897fc |
subdir('po-locations')
|
|
Packit Service |
4897fc |
meson.add_install_script('meson/meson_post_install.py')
|