Add support for building with meson
Also fix an import in taggedalgebraic.d
This commit is contained in:
parent
c658b37bdb
commit
2800c0ceb2
13
meson.build
Normal file
13
meson.build
Normal file
|
@ -0,0 +1,13 @@
|
|||
project('taggedalgebraic', 'd',
|
||||
meson_version: '>=0.50',
|
||||
version: '0.11.9'
|
||||
)
|
||||
|
||||
project_soversion = '0'
|
||||
project_version_suffix = ''
|
||||
project_version = meson.project_version()
|
||||
project_version_full = project_version + project_version_suffix
|
||||
|
||||
source_root = meson.source_root()
|
||||
build_root = meson.build_root()
|
||||
subdir('source/taggedalgebraic')
|
35
source/taggedalgebraic/meson.build
Normal file
35
source/taggedalgebraic/meson.build
Normal file
|
@ -0,0 +1,35 @@
|
|||
taggedalgebraic_src = [
|
||||
'taggedalgebraic.d',
|
||||
'taggedunion.d',
|
||||
'visit.d',
|
||||
]
|
||||
|
||||
taggedalgebraic_lib = library(
|
||||
'taggedalgebraic',
|
||||
taggedalgebraic_src,
|
||||
version: project_version,
|
||||
install: true,
|
||||
include_directories: include_directories('../')
|
||||
)
|
||||
|
||||
pkgc = import('pkgconfig')
|
||||
|
||||
pkgc.generate(
|
||||
taggedalgebraic_lib,
|
||||
subdirs: 'd/taggedalgebraic',
|
||||
)
|
||||
|
||||
install_headers(
|
||||
taggedalgebraic_src,
|
||||
subdir: 'd/taggedalgebraic/taggedalgebraic',
|
||||
)
|
||||
|
||||
test_exe = executable(
|
||||
'taggedalgebraic_test',
|
||||
taggedalgebraic_src,
|
||||
include_directories: include_directories('../'),
|
||||
d_unittest: true,
|
||||
link_args: '-main',
|
||||
)
|
||||
|
||||
test('test_taggedalgebraic', test_exe)
|
|
@ -139,7 +139,7 @@ struct TaggedAlgebraic(U) if (is(U == union) || is(U == struct) || is(U == enum)
|
|||
///
|
||||
@safe unittest
|
||||
{
|
||||
import taggedalgebraic;
|
||||
import taggedalgebraic.taggedalgebraic;
|
||||
|
||||
struct Foo {
|
||||
string name;
|
||||
|
|
Loading…
Reference in a new issue