edi/meson.build

69 lines
2.3 KiB
Meson
Raw Normal View History

2017-10-03 09:52:45 -07:00
project(
'edi', 'c',
version : '0.0.1',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.40.0')
add_global_arguments('-DHAVE_CONFIG_H=1', '-DHAVE_CONFIG=1', language: 'c')
config_h = configuration_data()
config_h.set_quoted('PACKAGE' , meson.project_name())
config_h.set_quoted('PACKAGE_VERSION' , meson.project_version())
config_h.set_quoted('PACKAGE_URL' , 'https://www.enlightenment.org')
config_h.set_quoted('PACKAGE_TARNAME' , meson.project_name())
config_h.set_quoted('PACKAGE_BUGREPORT', 'enlightenment-devel@lists.sourceforge.net')
config_h.set_quoted('PACKAGE_STRING' , meson.project_name() + ' ' + meson.project_version())
config_h.set_quoted('PACKAGE_NAME' , meson.project_name())
2017-10-03 12:45:41 -07:00
config_h.set_quoted('PACKAGE_BIN_DIR', join_paths(get_option('prefix'), get_option('bindir')))
config_h.set_quoted('PACKAGE_LIB_DIR', join_paths(get_option('prefix'), get_option('libdir')))
config_h.set_quoted('PACKAGE_DATA_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'edi'))
config_h.set_quoted('PACKAGE_DOC_DIR', join_paths(get_option('prefix'), get_option('infodir'), 'edi'))
2017-10-03 09:52:45 -07:00
config_h.set_quoted('EFL_BETA_API_SUPPORT' , '1')
elm = dependency('elementary')
top_inc = include_directories('.')
cc = meson.get_compiler('c')
config_h.set_quoted('EFL_CFLAGS', run_command(find_program('pkg-config'), '--libs', '--cflags', 'elementary').stdout().strip())
intl = cc.find_library('intl', required : false)
2017-10-04 16:09:30 -07:00
bear = find_program('bear', required : false)
if get_option('bear') == true and bear.found()
2017-10-03 09:52:45 -07:00
config_h.set_quoted('BEAR_COMMAND', 'bear')
else
config_h.set_quoted('BEAR_COMMAND', '')
2017-10-03 09:52:45 -07:00
endif
2017-10-10 07:55:31 -07:00
if get_option('libclang') == true and cc.has_header('clang-c/Index.h')
has_clang_header = true
2017-10-04 15:52:29 -07:00
clang = cc.find_library('clang', dirs : ['/usr/local/opt/llvm/lib'])
2017-10-03 09:52:45 -07:00
clang_include_dir_command = run_command(find_program('scripts/clang_include_dir.sh'))
clang_include_dir = clang_include_dir_command.stdout().strip()
config_h.set_quoted('CLANG_INCLUDES', clang_include_dir)
config_h.set('HAVE_LIBCLANG', '1')
else
has_clang_header = false
2017-10-03 09:52:45 -07:00
endif
subdir('po')
subdir('src')
subdir('doc')
subdir('data')
2017-10-03 12:45:57 -07:00
install_data(['AUTHORS'],
install_dir : join_paths(get_option('prefix'), get_option('infodir'), 'edi')
)
2017-10-03 09:52:45 -07:00
configure_file(
output : 'config.h',
install : false,
configuration: config_h
)