2020-03-01 03:59:56 +03:00
|
|
|
project('blurhash', 'cpp',
|
|
|
|
version : '0.1',
|
|
|
|
default_options : ['warning_level=3', 'cpp_std=c++17'])
|
|
|
|
|
2020-03-01 15:42:22 +03:00
|
|
|
lib = static_library('blurhash',
|
2020-03-01 03:59:56 +03:00
|
|
|
'blurhash.cpp',
|
|
|
|
install : true)
|
|
|
|
|
2021-01-20 12:29:22 +03:00
|
|
|
doctest_dep = dependency('doctest', required : false)
|
|
|
|
|
|
|
|
if not doctest_dep.found()
|
|
|
|
doctest_proj = subproject('doctest')
|
|
|
|
doctest_dep = doctest_proj.get_variable('doctest_dep')
|
|
|
|
endif
|
|
|
|
|
2020-03-01 03:59:56 +03:00
|
|
|
tests = executable('blurhash-tests',
|
|
|
|
'blurhash.cpp',
|
|
|
|
cpp_args : '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN',
|
|
|
|
dependencies: doctest_dep,
|
|
|
|
install : false)
|
|
|
|
test('blurhash-tests', tests)
|
2020-03-01 15:42:22 +03:00
|
|
|
|
|
|
|
executable('blurhash2bmp', 'blurhash2bmp.cpp', link_with: lib, install: true)
|
|
|
|
executable('blurhash', 'image2blurhash.cpp', link_with: lib, install: true)
|