efm2/meson.build

52 lines
1.9 KiB
Meson

project('efm', 'c', version: '0.0.0', license: 'GPL2',
default_options: [ 'buildtype=plain', 'c_std=gnu99' ],
meson_version: '>= 0.47.0')
proj = meson.project_name()
ver = meson.project_version()
base_url = 'https://www.enlightenment.org/about-'
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : false)
deps = [
dependency('elementary', version: '>= 1.26.0'),
dependency('emotion', version: '>= 1.26.0'),
m_dep
]
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd']
linux = ['linux']
sun = ['sunos']
sys_linux = linux.contains(host_machine.system())
sys_bsd = bsd.contains(host_machine.system())
sys_sun = sun.contains(host_machine.system())
dir_prefix = get_option('prefix')
dir_bin = join_paths(dir_prefix, get_option('bindir'))
dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_locale = join_paths(dir_prefix, get_option('localedir'))
cfg = configuration_data()
cfg.set_quoted('PACKAGE' , proj)
cfg.set_quoted('PACKAGE_NAME' , proj)
cfg.set_quoted('PACKAGE_VERSION' , ver)
cfg.set_quoted('PACKAGE_STRING' , proj + ' ' + ver)
cfg.set_quoted('PACKAGE_URL' , base_url + proj)
cfg.set_quoted('PACKAGE_BIN_DIR' , dir_bin)
cfg.set_quoted('PACKAGE_LIB_DIR' , dir_lib)
cfg.set_quoted('PACKAGE_DATA_DIR' , join_paths(dir_data, proj))
cfg.set_quoted('LOCALEDIR' , dir_locale)
cfg.set ('_GNU_SOURCE' , 1)
cfg.set ('__EXTENSIONS__' , 1)
cfg.set ('_POSIX_PTHREAD_SEMANTICS', 1)
cfg.set ('_ALL_SOURCE' , 1)
cfg.set ('_POSIX_SOURCE' , 1)
cfg.set ('_POSIX_1_SOURCE' , 1)
if sys_linux or sys_bsd or sys_sun
cfg.set('STAT_NSEC', '1')
endif
configure_file(output: 'efm_config.h', configuration: cfg)
subdir('src')
subdir('data')