mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-05 22:09:52 +01:00
7125fdb13b
- Building unit tests is optional, disabled by default to prevent the library clients from pulling the dependency on boost - Add the unit tests to the Github Actions. - Use boost::filesystem to manipulate paths for better portability
22 lines
693 B
Meson
22 lines
693 B
Meson
project('poly2tri', ['cpp'])
|
|
|
|
include = include_directories('.')
|
|
lib = static_library('poly2tri', sources : [
|
|
'poly2tri/common/shapes.cc',
|
|
'poly2tri/sweep/advancing_front.cc',
|
|
'poly2tri/sweep/cdt.cc',
|
|
'poly2tri/sweep/sweep.cc',
|
|
'poly2tri/sweep/sweep_context.cc',
|
|
])
|
|
|
|
thread_dep = dependency('threads')
|
|
boost_test_dep = dependency('boost', modules : [ 'filesystem', 'unit_test_framework' ], required : false)
|
|
if boost_test_dep.found()
|
|
test('Unit Test', executable('unittest', [
|
|
'unittest/main.cpp',
|
|
'unittest/TriangleTest.cpp',
|
|
], dependencies : [boost_test_dep, thread_dep], link_with : lib))
|
|
endif
|
|
|
|
poly2tri_dep = declare_dependency(include_directories : include, link_with : lib)
|