You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

161 lines
4.2 KiB

project('express', 'c',
version : '0.0.2',
meson_version : '>= 0.53',
default_options : [
'warning_level=2',
'buildtype=debugoptimized'
]
)
v_array = meson.project_version().split('.')
v_maj = v_array[0]
v_min = v_array[1]
v_mic = v_array[2]
# install paths
dir_prefix = get_option('prefix')
dir_include = join_paths(dir_prefix, get_option('includedir'))
dir_pkginclude = join_paths(dir_include, meson.project_name())
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_pkgdata = join_paths(dir_data, meson.project_name())
dir_locale = join_paths(dir_prefix, get_option('localedir'))
# host
host_os = host_machine.system()
# binaries
cc = meson.get_compiler('c')
express_cflags = []
express_cflags_try = [
'-fvisibility=hidden',
'-fdata-sections',
'-ffunction-sections',
'-fno-strict-aliasing',
'-Wshadow',
'-Wstrict-prototypes',
'-Werror=pointer-arith',
'-Wno-missing-field-initializers']
foreach cf: express_cflags_try
if cc.has_argument(cf) == true
express_cflags += cf
endif
endforeach
add_global_arguments(express_cflags, language: 'c')
express_lflags = []
if cc.has_link_argument('-Wl,--gc-sections')
express_lflags += '-Wl,--gc-sections'
endif
if cc.has_link_argument('-Wl,--as-needed')
express_lflags += '-Wl,--as-needed'
endif
if cc.has_link_argument('-Wl,--no-copy-dt-needed-entries')
express_lflags += '-Wl,--no-copy-dt-needed-entries'
endif
add_global_link_arguments(express_lflags, language: 'c')
pkgconfig = import('pkgconfig')
windows = import('windows')
edje_cc = find_program('edje_cc', native: true)
edje_cc_exe = [ edje_cc ]
# libraries
config_dir = [include_directories('.')]
efl_req = '>= 1.12.0'
express_lib_deps = [
dependency('eina', version : efl_req),
dependency('ecore', version : efl_req),
dependency('ecore-con', version : efl_req)
]
requirement_express_pc = ' eina ' + efl_req + ' ecore ' + efl_req + ' ecore-con ' + efl_req
if get_option('nls') == true
express_lib_deps += cc.find_library('intl', required: false)
endif
express_cargs = [ ]
# configuration
config_h = configuration_data()
config_h.set('EFL_BETA_API_SUPPORT', 1)
config_h.set('EFL_EO_API_SUPPORT', 1)
config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h.set_quoted('PACKAGE_BIN_DIR', dir_bin)
config_h.set_quoted('PACKAGE_LIB_DIR', dir_lib)
config_h.set_quoted('PACKAGE_DATA_DIR', dir_pkgdata)
config_h.set_quoted('PACKAGE_LOCALE_DIR', dir_locale)
if cc.has_function('mkstemps')
config_h.set('HAVE_MKSTEMPS', 1)
endif
subdir('data/desktop')
subdir('data/fonts')
subdir('data/images')
subdir('data/themes')
subdir('src/lib')
subdir('src/bin')
#if get_option('nls') == true
# subdir('po')
#endif
# Use config_h after all subdirs have set values
configure_file(output : 'express_config.h', configuration : config_h)
# pkg-config
pkgconf = configuration_data()
pkgconf.set('prefix', get_option('prefix'))
pkgconf.set('exec_prefix', '${prefix}')
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
pkgconf.set('pkgincludedir', '${prefix}/@0@'.format(get_option('includedir')) + '/express')
pkgconf.set('VMAJ', v_maj)
pkgconf.set('VERSION', meson.project_version())
pkgconf.set('requirements_libexpress_pc', requirement_express_pc)
pkgconf.set('requirements_libexpress_libs', requirement_express_libs)
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
configure_file(
input : join_paths(meson.source_root(), 'libexpress.pc.in'),
output : 'libexpress.pc',
configuration : pkgconf,
install_dir : pkg_install_dir
)
# output
summary({'OS': host_os,
}, section: 'Configuration Options Summary:')
summary({'prefix': dir_prefix,
'bindir': dir_bin,
'libdir': dir_lib,
'incdir': dir_include,
'pkgincdir': dir_pkginclude,
'datadir': dir_data,
'pkgdatadir': dir_pkgdata,
}, section: 'Directories:')
summary({'compilation': 'ninja',
'installation': 'ninja install',
}, section: 'Compilation')