mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
meson: Use system doctest if available
* meson.build (doctest_proj): check if available as system dependency * blurhash.cpp: change doctest include path to doctest/doctest.h
This commit is contained in:
parent
9b94940251
commit
445c7d81f5
2 changed files with 8 additions and 3 deletions
|
@ -11,7 +11,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||||
#include <doctest.h>
|
#include <doctest/doctest.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
|
@ -6,8 +6,13 @@ lib = static_library('blurhash',
|
||||||
'blurhash.cpp',
|
'blurhash.cpp',
|
||||||
install : true)
|
install : true)
|
||||||
|
|
||||||
|
doctest_dep = dependency('doctest', required : false)
|
||||||
|
|
||||||
|
if not doctest_dep.found()
|
||||||
doctest_proj = subproject('doctest')
|
doctest_proj = subproject('doctest')
|
||||||
doctest_dep = doctest_proj.get_variable('doctest_dep')
|
doctest_dep = doctest_proj.get_variable('doctest_dep')
|
||||||
|
endif
|
||||||
|
|
||||||
tests = executable('blurhash-tests',
|
tests = executable('blurhash-tests',
|
||||||
'blurhash.cpp',
|
'blurhash.cpp',
|
||||||
cpp_args : '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN',
|
cpp_args : '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN',
|
||||||
|
|
Loading…
Reference in a new issue