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
|
--- a/meson.build
+++ b/meson.build
@@ -10,11 +10,11 @@
build_by_default : true,
output : ['lexer.c', 'lexer.h'],
input : 'include/lexer.l',
- command : [LEX_PROGRAM, '-o../autogen/@OUTPUT0@', '--header-file=../autogen/@OUTPUT1@', '@INPUT@', ],
+ command : [LEX_PROGRAM, '-o@OUTPUT0@', '--header-file=@OUTPUT1@', '@INPUT@'],
)
-SRCS = library('SRCS', 'src/ast.c', 'src/token.c', 'src/utils.c')
-LEX = CC.find_library('l', required : true)
+SRCS = library('SRCS', 'src/ast.c', 'src/token.c', 'src/utils.c', install : true)
+LEX = CC.find_library('fl', required : true)
PHCC = executable(
'PHCC',
'src/main.c',
@@ -23,15 +23,14 @@
install : true
)
-unity_subproject = subproject('unity')
-unity_dependency = unity_subproject.get_variable('unity_dep')
-unity_gen_runner = unity_subproject.get_variable('gen_test_runner')
+unity_dependency = CC.find_library('unity', required : true)
+unity_include = include_directories('/usr/include/unity')
lexer_tests = executable(
'lexer_tests',
sources : [files(['test' / 'lexer_tests.c'])],
link_with : SRCS,
- include_directories : [include_directories('include')],
+ include_directories : [include_directories('include'), unity_include],
dependencies : [unity_dependency, LEX],
)
|