forked from ak-fortuna/fortuna
43 lines
904 B
Meson
43 lines
904 B
Meson
# configure and build with: meson build && ninja -C build
|
|
project('fortuna', ['cpp'],
|
|
version: '0.1.0',
|
|
license: 'GPL',
|
|
default_options: [
|
|
'cpp_std=c++20',
|
|
'warning_level=3',
|
|
'buildtype=plain'
|
|
]
|
|
)
|
|
|
|
cc = meson.get_compiler('cpp')
|
|
|
|
fmt_dep = cc.find_library('fmt', required : true)
|
|
cryptopp_dep = cc.find_library('cryptopp', required : true)
|
|
thread_dep = dependency('threads')
|
|
|
|
sources = [
|
|
'main.cpp',
|
|
'fortuna.cpp',
|
|
'generator.cpp',
|
|
'accumulator.cpp',
|
|
'pool.cpp',
|
|
'seed_file_management.cpp',
|
|
'urandom_entropy_src.cpp',
|
|
'do_task.cpp',
|
|
]
|
|
|
|
if get_option('buildtype').startswith('release')
|
|
add_project_arguments('-DNDEBUG', language : ['cpp'])
|
|
endif
|
|
|
|
cc_args = ['-std=c++20']
|
|
incdir = include_directories('.')
|
|
|
|
|
|
executable('fortuna', sources,
|
|
dependencies : [thread_dep, fmt_dep, cryptopp_dep],
|
|
include_directories: incdir,
|
|
cpp_args: cc_args)
|
|
|
|
cpp_ld = 'lld'
|