23 lines
649 B
Meson
23 lines
649 B
Meson
project('tutorial', 'c')
|
|
|
|
CC = meson.get_compiler('c')
|
|
target_name = 'main'
|
|
|
|
|
|
zlib = dependency('zlib', version : '1.2.11', static: true, required: true)
|
|
|
|
|
|
files = files('src/main.c')
|
|
|
|
if get_option('buildtype') == 'debug'
|
|
if CC.has_argument('-fsanitize=address') and CC.has_link_argument('-fsanitize=address')
|
|
add_project_arguments('-fsanitize=address', '-fno-omit-frame-pointer', language: 'c')
|
|
add_project_link_arguments('-fsanitize=address', language: 'c')
|
|
endif
|
|
add_project_arguments('-DDEBUG', language: 'c')
|
|
endif
|
|
|
|
|
|
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))
|
|
|
|
|