aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-09-23 18:53:15 -0400
committerDavid Robillard <d@drobilla.net>2023-09-23 18:53:15 -0400
commitf6f0ecfa0aa9872a582e22f2b839d500105aafa1 (patch)
treef4eae44cd0de87ee9e94bc8ffc76e55ecb28409b
parenta347ffd2f45feb4e180dd470046436f51591bd91 (diff)
downloadpugl-f6f0ecfa0aa9872a582e22f2b839d500105aafa1.tar.gz
pugl-f6f0ecfa0aa9872a582e22f2b839d500105aafa1.tar.bz2
pugl-f6f0ecfa0aa9872a582e22f2b839d500105aafa1.zip
Format meson.build files with muon
The less time wasted with manual code formatting, the better.
-rw-r--r--bindings/cpp/include/meson.build3
-rw-r--r--doc/c/meson.build32
-rw-r--r--doc/cpp/meson.build28
-rw-r--r--examples/meson.build6
-rw-r--r--examples/pugl_shader_demo.app/MacOS/meson.build2
-rw-r--r--include/meson.build3
-rw-r--r--meson.build9
-rw-r--r--test/meson.build11
8 files changed, 59 insertions, 35 deletions
diff --git a/bindings/cpp/include/meson.build b/bindings/cpp/include/meson.build
index 2521f8e..08e66bb 100644
--- a/bindings/cpp/include/meson.build
+++ b/bindings/cpp/include/meson.build
@@ -2,10 +2,9 @@
# SPDX-License-Identifier: 0BSD OR ISC
cpp_headers = files(
- 'pugl/pugl.hpp',
-
'pugl/cairo.hpp',
'pugl/gl.hpp',
+ 'pugl/pugl.hpp',
'pugl/stub.hpp',
'pugl/vulkan.hpp',
)
diff --git a/doc/c/meson.build b/doc/c/meson.build
index 761557d..1401aa3 100644
--- a/doc/c/meson.build
+++ b/doc/c/meson.build
@@ -25,14 +25,14 @@ summary_rst = configure_file(
copied_rst_files = [deployment_rst, summary_rst]
c_rst_files = files(
+ 'clipboards.rst',
+ 'event-loop.rst',
+ 'events.rst',
'index.rst',
'overview.rst',
- 'world.rst',
+ 'shutting-down.rst',
'view.rst',
- 'events.rst',
- 'event-loop.rst',
- 'clipboards.rst',
- 'shutting-down.rst'
+ 'world.rst',
)
foreach f : c_rst_files
@@ -45,8 +45,15 @@ subdir('api')
docs = custom_target(
'singlehtml',
build_by_default: true,
- command: [sphinx_build, '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'singlehtml'],
+ command: [
+ sphinx_build,
+ '-M', 'singlehtml',
+ '@OUTDIR@',
+ '@OUTDIR@',
+ '-E',
+ '-q',
+ '-t', 'singlehtml',
+ ],
input: [c_rst_files, copied_rst_files, c_pugl_rst, c_index_xml],
install: true,
install_dir: docdir / 'pugl-0',
@@ -56,8 +63,15 @@ docs = custom_target(
docs = custom_target(
'html',
build_by_default: true,
- command: [sphinx_build, '-M', 'html', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'html'],
+ command: [
+ sphinx_build,
+ '-M', 'html',
+ '@OUTDIR@',
+ '@OUTDIR@',
+ '-E',
+ '-q',
+ '-t', 'html',
+ ],
input: [c_rst_files, copied_rst_files, c_pugl_rst, c_index_xml],
install: true,
install_dir: docdir / 'pugl-0',
diff --git a/doc/cpp/meson.build b/doc/cpp/meson.build
index f18be1b..ca6bc5b 100644
--- a/doc/cpp/meson.build
+++ b/doc/cpp/meson.build
@@ -14,12 +14,12 @@ configure_file(copy: true, input: '../deployment.rst', output: 'deployment.rst')
configure_file(copy: true, input: '../summary.rst', output: 'summary.rst')
cpp_rst_files = files(
+ 'event-loop.rst',
+ 'events.rst',
'index.rst',
'overview.rst',
- 'world.rst',
'view.rst',
- 'events.rst',
- 'event-loop.rst',
+ 'world.rst',
)
foreach f : cpp_rst_files
@@ -32,8 +32,15 @@ subdir('api')
docs = custom_target(
'singlehtml',
build_by_default: true,
- command: [sphinx_build, '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'singlehtml'],
+ command: [
+ sphinx_build,
+ '-M', 'singlehtml',
+ '@OUTDIR@',
+ '@OUTDIR@',
+ '-E',
+ '-q',
+ '-t', 'singlehtml',
+ ],
input: [cpp_rst_files, cpp_pugl_rst, cpp_index_xml],
install: true,
install_dir: docdir / 'puglpp-0',
@@ -42,8 +49,15 @@ docs = custom_target(
docs = custom_target(
'html',
- command: [sphinx_build, '-M', 'html', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'html'],
+ command: [
+ sphinx_build,
+ '-M', 'html',
+ '@OUTDIR@',
+ '@OUTDIR@',
+ '-E',
+ '-q',
+ '-t', 'html',
+ ],
build_by_default: true,
input: [cpp_rst_files, cpp_pugl_rst, cpp_index_xml],
install: true,
diff --git a/examples/meson.build b/examples/meson.build
index 5c995a9..aa04e80 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -72,9 +72,9 @@ if get_option('warning_level') == 'everything' and is_variable('cpp')
]
elif cpp.get_id() == 'msvc'
example_cpp_args += [
- '/wd4355', # 'this' used in base member initializer list
- '/wd4868', # may not enforce left-to-right evaluation order
- '/wd5246', # subobject initialization should be wrapped in braces
+ '/wd4355', # 'this' used in base member initializer list
+ '/wd4868', # may not enforce left-to-right evaluation order
+ '/wd5246', # subobject initialization should be wrapped in braces
]
endif
diff --git a/examples/pugl_shader_demo.app/MacOS/meson.build b/examples/pugl_shader_demo.app/MacOS/meson.build
index 0731864..d3d0755 100644
--- a/examples/pugl_shader_demo.app/MacOS/meson.build
+++ b/examples/pugl_shader_demo.app/MacOS/meson.build
@@ -11,5 +11,5 @@ executable(
c_args: example_defines + example_c_args,
cpp_args: example_defines + example_cpp_args,
dependencies: [pugl_dep, pugl_gl_dep, dl_dep],
- include_directories: include_directories('../../..'),
+ include_directories: include_directories('../../..'),
)
diff --git a/include/meson.build b/include/meson.build
index 20b056f..3d838ca 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -3,11 +3,10 @@
c_headers = files(
'pugl/attributes.h',
- 'pugl/pugl.h',
-
'pugl/cairo.h',
'pugl/gl.h',
'pugl/glu.h',
+ 'pugl/pugl.h',
'pugl/stub.h',
'pugl/vulkan.h',
)
diff --git a/meson.build b/meson.build
index 13755f6..e3b8450 100644
--- a/meson.build
+++ b/meson.build
@@ -57,8 +57,9 @@ add_project_arguments(
core_args = []
dl_dep = cc.find_library('dl', required: false)
-# MacOS
if host_machine.system() == 'darwin'
+ # MacOS
+
framework_deps = dependency(
'appleframeworks',
modules: ['foundation', 'corevideo'],
@@ -80,8 +81,9 @@ if host_machine.system() == 'darwin'
add_project_arguments(platform_suppressions, language: mac_languages)
add_project_link_arguments(['-Wl,-framework,Cocoa'], language: mac_languages)
-# Windows
elif host_machine.system() == 'windows'
+ # Windows
+
if get_option('default_library') == 'both'
error('default_library=both is not supported on Windows')
endif
@@ -165,7 +167,8 @@ elif host_machine.system() == 'windows'
extension = '.c'
soversion = ''
-else # X11
+else
+ # X11
x11_dep = cc.find_library('X11')
core_args += '-D_POSIX_C_SOURCE=200809L'
diff --git a/test/meson.build b/test/meson.build
index 02fb1b9..f8d2fd1 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -59,9 +59,7 @@ basic_tests = [
'world',
]
-cairo_tests = [
- 'cairo'
-]
+cairo_tests = ['cairo']
gl_tests = [
'gl',
@@ -69,9 +67,7 @@ gl_tests = [
'gl_hints',
]
-vulkan_tests = [
- 'vulkan'
-]
+vulkan_tests = ['vulkan']
includes = [
'.',
@@ -188,8 +184,7 @@ if host_machine.system() == 'darwin'
]
endif
- unified_args += objcpp.get_supported_arguments(
- test_cpp_args + objcpp_args)
+ unified_args += objcpp.get_supported_arguments(test_cpp_args + objcpp_args)
test(
'inline_objcpp',