1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
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,
|