Skip to content

Commit

Permalink
[build] Add Meson build system
Browse files Browse the repository at this point in the history
Co-authored-by: Håvard Sørbø <[email protected]>
  • Loading branch information
oleavr and hsorbo committed Aug 21, 2022
1 parent 2e1d06a commit a834d3c
Show file tree
Hide file tree
Showing 26 changed files with 2,650 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/cppgc/internal/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cppgc_internal_headers = [
'write-barrier.h',
'gc-info.h',
'persistent-node.h',
'name-trait.h',
'pointer-policies.h',
'logging.h',
'api-constants.h',
'atomic-entry-flag.h',
'member-storage.h',
'compiler-specific.h',
'finalizer-trait.h',
'caged-heap-local-data.h',
'base-page-handle.h',
'caged-heap.h',
]

install_headers(cppgc_internal_headers, subdir: install_header_subdir / 'cppgc' / 'internal')
34 changes: 34 additions & 0 deletions include/cppgc/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cppgc_headers = [
'testing.h',
'cross-thread-persistent.h',
'name-provider.h',
'persistent.h',
'prefinalizer.h',
'allocation.h',
'process-heap-statistics.h',
'ephemeron-pair.h',
'custom-space.h',
'type-traits.h',
'heap-state.h',
'default-platform.h',
'heap-statistics.h',
'heap-handle.h',
'visitor.h',
'garbage-collected.h',
'trace-trait.h',
'object-size-trait.h',
'common.h',
'heap-consistency.h',
'macros.h',
'heap.h',
'sentinel-pointer.h',
'liveness-broker.h',
'member.h',
'platform.h',
'source-location.h',
'explicit-management.h',
]

install_headers(cppgc_headers, subdir: install_header_subdir / 'cppgc')

subdir('internal')
7 changes: 7 additions & 0 deletions include/libplatform/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
libplatform_headers = [
'libplatform-export.h',
'libplatform.h',
'v8-tracing.h',
]

install_headers(libplatform_headers, subdir: install_header_subdir / 'libplatform')
88 changes: 88 additions & 0 deletions include/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
install_header_subdir = 'v8-' + api_version

v8_inspector_js_protocol = files('js_protocol.pdl')

v8_headers = [
'v8-array-buffer.h',
'v8-callbacks.h',
'v8-container.h',
'v8-context.h',
'v8-cppgc.h',
'v8-data.h',
'v8-date.h',
'v8-debug.h',
'v8-embedder-heap.h',
'v8-embedder-state-scope.h',
'v8-exception.h',
'v8-extension.h',
'v8-external.h',
'v8-fast-api-calls.h',
'v8-forward.h',
'v8-function-callback.h',
'v8-function.h',
'v8-initialization.h',
'v8-inspector-protocol.h',
'v8-inspector.h',
'v8-internal.h',
'v8-isolate.h',
'v8-json.h',
'v8-local-handle.h',
'v8-locker.h',
'v8-maybe.h',
'v8-memory-span.h',
'v8-message.h',
'v8-metrics.h',
'v8-microtask-queue.h',
'v8-microtask.h',
'v8-object.h',
'v8-persistent-handle.h',
'v8-platform.h',
'v8-primitive-object.h',
'v8-primitive.h',
'v8-profiler.h',
'v8-promise.h',
'v8-proxy.h',
'v8-regexp.h',
'v8-script.h',
'v8-snapshot.h',
'v8-statistics.h',
'v8-template.h',
'v8-traced-handle.h',
'v8-typed-array.h',
'v8-unwinder-state.h',
'v8-unwinder.h',
'v8-util.h',
'v8-value-serializer-version.h',
'v8-value-serializer.h',
'v8-value.h',
'v8-version-string.h',
'v8-version.h',
'v8-wasm-trap-handler-posix.h',
'v8-wasm-trap-handler-win.h',
'v8-wasm.h',
'v8-weak-callback-info.h',
'v8.h',
'v8config.h',
]

install_headers(v8_headers, subdir: install_header_subdir)

command = [
gen_v8_gn,
'-o', '@OUTPUT@',
]
foreach d : enabled_external_defines
command += ['-p', d]
endforeach
foreach d : disabled_external_defines
command += ['-n', d]
endforeach
v8_gn_h = custom_target('v8-gn-header',
output: 'v8-gn.h',
command: command,
install: true,
install_dir: get_option('includedir') / install_header_subdir,
)

subdir('cppgc')
subdir('libplatform')
Loading

0 comments on commit a834d3c

Please sign in to comment.