diff --git a/meson.build b/meson.build index e6a3093..fbde456 100644 --- a/meson.build +++ b/meson.build @@ -4,20 +4,16 @@ project( default_options: ['buildtype=release', 'prefix=/usr'], ) +cc = meson.get_compiler('c') +lib_path = meson.current_source_dir() / 'libpg_query' +libpg_query = cc.find_library('pg_query', required: true) + dependencies = [ dependency('glib-2.0'), dependency('gobject-2.0'), + libpg_query ] -libpg_query = custom_target( - 'libpg_query', - input: 'libpg_query/Makefile', - output: 'libpg_query.a', - command: ['script.sh', meson.current_build_dir(), meson.current_source_dir()], - build_always: true, - install: false, -) - # foobar_dep = declare_dependency (sources: lib_target) sources = files( @@ -28,22 +24,15 @@ vapi_dir = meson.current_source_dir() / 'vapi' add_project_arguments(['--vapidir', vapi_dir], language: 'vala') add_project_arguments(['--pkg', 'libpg_query'], language: 'vala') -# cc = meson.get_compiler('c') -# lib_path = meson.current_source_dir() / 'libpg_query' -# libpg_query = cc.find_library('pg_query', required: true, dirs: lib_path) +dependencies += libpg_query pgquery_vala = library('pgquery-vala', sources, dependencies: dependencies, include_directories: include_directories('libpg_query'), install: true, - link_with: libpg_query, install_dir: [true, true, true] ) -install_headers( - 'libpg_query/pg_query.h', -) - # pgquery_vala_dep = declare_dependency( # include_directories: include_directories('libpg_query/include'), # link_with: pgquery_vala,