diff options
author | David Robillard <d@drobilla.net> | 2025-02-07 15:35:19 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-02-07 15:35:19 -0500 |
commit | 7976df1832f8164e459902dc247a232f49b61064 (patch) | |
tree | d00dc8c7317b9ac3098f7facb47d84ffe34109f9 | |
parent | da301d48c6d519fb2020573c6a501a0c43f9064c (diff) | |
download | pugl-7976df1832f8164e459902dc247a232f49b61064.tar.gz pugl-7976df1832f8164e459902dc247a232f49b61064.tar.bz2 pugl-7976df1832f8164e459902dc247a232f49b61064.zip |
Use angle brackets for library includes and clean up include paths
87 files changed, 156 insertions, 187 deletions
diff --git a/bindings/cpp/include/pugl/cairo.hpp b/bindings/cpp/include/pugl/cairo.hpp index e619412..4a51f96 100644 --- a/bindings/cpp/include/pugl/cairo.hpp +++ b/bindings/cpp/include/pugl/cairo.hpp @@ -4,8 +4,8 @@ #ifndef PUGL_CAIRO_HPP #define PUGL_CAIRO_HPP -#include "pugl/cairo.h" -#include "pugl/pugl.h" +#include <pugl/cairo.h> +#include <pugl/pugl.h> namespace pugl { diff --git a/bindings/cpp/include/pugl/gl.hpp b/bindings/cpp/include/pugl/gl.hpp index 7c361e6..5aa5ca5 100644 --- a/bindings/cpp/include/pugl/gl.hpp +++ b/bindings/cpp/include/pugl/gl.hpp @@ -4,9 +4,9 @@ #ifndef PUGL_GL_HPP #define PUGL_GL_HPP -#include "pugl/gl.h" -#include "pugl/pugl.h" -#include "pugl/pugl.hpp" +#include <pugl/gl.h> +#include <pugl/pugl.h> +#include <pugl/pugl.hpp> namespace pugl { diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp index bf87ed3..32321c7 100644 --- a/bindings/cpp/include/pugl/pugl.hpp +++ b/bindings/cpp/include/pugl/pugl.hpp @@ -4,10 +4,10 @@ #ifndef PUGL_PUGL_HPP #define PUGL_PUGL_HPP -#include "pugl/pugl.h" +#include <pugl/pugl.h> -#include <cstddef> // IWYU pragma: keep -#include <cstdint> // IWYU pragma: keep +#include <cstddef> +#include <cstdint> #if defined(PUGL_HPP_THROW_FAILED_CONSTRUCTION) # include <exception> diff --git a/bindings/cpp/include/pugl/stub.hpp b/bindings/cpp/include/pugl/stub.hpp index 08281b0..13b050d 100644 --- a/bindings/cpp/include/pugl/stub.hpp +++ b/bindings/cpp/include/pugl/stub.hpp @@ -4,8 +4,8 @@ #ifndef PUGL_STUB_HPP #define PUGL_STUB_HPP -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> namespace pugl { diff --git a/bindings/cpp/include/pugl/vulkan.hpp b/bindings/cpp/include/pugl/vulkan.hpp index 5bb790d..56c91b0 100644 --- a/bindings/cpp/include/pugl/vulkan.hpp +++ b/bindings/cpp/include/pugl/vulkan.hpp @@ -10,9 +10,9 @@ #ifndef PUGL_VULKAN_HPP #define PUGL_VULKAN_HPP -#include "pugl/pugl.h" -#include "pugl/pugl.hpp" -#include "pugl/vulkan.h" +#include <pugl/pugl.h> +#include <pugl/pugl.hpp> +#include <pugl/vulkan.h> #include <vulkan/vulkan_core.h> diff --git a/bindings/cpp/meson.build b/bindings/cpp/meson.build index 3e55c71..0e8ba6a 100644 --- a/bindings/cpp/meson.build +++ b/bindings/cpp/meson.build @@ -8,7 +8,7 @@ subdir('include') puglpp_dep = declare_dependency( - dependencies: core_deps + [pugl_dep], + dependencies: [pugl_dep], include_directories: include_directories('include'), link_with: libpugl, ) diff --git a/examples/cube_view.h b/examples/cube_view.h index 6941870..a02154f 100644 --- a/examples/cube_view.h +++ b/examples/cube_view.h @@ -8,8 +8,8 @@ #include "demo_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <stdbool.h> diff --git a/examples/demo_utils.h b/examples/demo_utils.h index da3b2cd..db66b21 100644 --- a/examples/demo_utils.h +++ b/examples/demo_utils.h @@ -4,7 +4,7 @@ #ifndef EXAMPLES_DEMO_UTILS_H #define EXAMPLES_DEMO_UTILS_H -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <math.h> #include <stdio.h> diff --git a/examples/meson.build b/examples/meson.build index 8206a10..6a58619 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -27,11 +27,6 @@ vulkan_examples = [ 'pugl_vulkan_demo.c', ] -includes = include_directories( - '../bindings/cpp/include', - '../include', -) - # Suppress some additional C warnings in examples example_c_args = [] if get_option('warning_level') == 'everything' @@ -128,7 +123,6 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, ) endforeach @@ -160,7 +154,6 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, ) endforeach endif @@ -174,7 +167,6 @@ else example, c_args: example_defines + example_c_args + cairo_args, dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep], - include_directories: includes, ) endforeach endif @@ -203,7 +195,6 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, ) endforeach endif diff --git a/examples/pugl_cairo_demo.app/MacOS/meson.build b/examples/pugl_cairo_demo.app/MacOS/meson.build index 66221c7..6143429 100644 --- a/examples/pugl_cairo_demo.app/MacOS/meson.build +++ b/examples/pugl_cairo_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args + cairo_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_cairo_demo.c b/examples/pugl_cairo_demo.c index 1c16a93..4af0b37 100644 --- a/examples/pugl_cairo_demo.c +++ b/examples/pugl_cairo_demo.c @@ -5,8 +5,8 @@ #include "puglutil/test_utils.h" -#include "pugl/cairo.h" -#include "pugl/pugl.h" +#include <pugl/cairo.h> +#include <pugl/pugl.h> #include <cairo.h> diff --git a/examples/pugl_clipboard_demo.c b/examples/pugl_clipboard_demo.c index 2f1fdbe..0defc65 100644 --- a/examples/pugl_clipboard_demo.c +++ b/examples/pugl_clipboard_demo.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <math.h> #include <stdbool.h> diff --git a/examples/pugl_cpp_demo.app/MacOS/meson.build b/examples/pugl_cpp_demo.app/MacOS/meson.build index b840771..a8eda53 100644 --- a/examples/pugl_cpp_demo.app/MacOS/meson.build +++ b/examples/pugl_cpp_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [puglpp_dep, pugl_gl_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_cpp_demo.cpp b/examples/pugl_cpp_demo.cpp index 37efe45..e6075ff 100644 --- a/examples/pugl_cpp_demo.cpp +++ b/examples/pugl_cpp_demo.cpp @@ -6,9 +6,9 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.hpp" -#include "pugl/pugl.h" -#include "pugl/pugl.hpp" +#include <pugl/gl.hpp> +#include <pugl/pugl.h> +#include <pugl/pugl.hpp> #include <cmath> diff --git a/examples/pugl_cursor_demo.app/MacOS/meson.build b/examples/pugl_cursor_demo.app/MacOS/meson.build index 54670ad..6e6209a 100644 --- a/examples/pugl_cursor_demo.app/MacOS/meson.build +++ b/examples/pugl_cursor_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_gl_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_cursor_demo.c b/examples/pugl_cursor_demo.c index a70a5eb..0783b88 100644 --- a/examples/pugl_cursor_demo.c +++ b/examples/pugl_cursor_demo.c @@ -3,8 +3,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <stdbool.h> diff --git a/examples/pugl_embed_demo.app/MacOS/meson.build b/examples/pugl_embed_demo.app/MacOS/meson.build index 3bef9c1..65f2fdf 100644 --- a/examples/pugl_embed_demo.app/MacOS/meson.build +++ b/examples/pugl_embed_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_gl_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_embed_demo.c b/examples/pugl_embed_demo.c index ff6a63e..61adf5c 100644 --- a/examples/pugl_embed_demo.c +++ b/examples/pugl_embed_demo.c @@ -6,8 +6,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <math.h> #include <stdbool.h> diff --git a/examples/pugl_management_demo.app/MacOS/meson.build b/examples/pugl_management_demo.app/MacOS/meson.build index 31604f6..fedcd17 100644 --- a/examples/pugl_management_demo.app/MacOS/meson.build +++ b/examples/pugl_management_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args + cairo_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_management_demo.c b/examples/pugl_management_demo.c index 156b2dd..6e42efa 100644 --- a/examples/pugl_management_demo.c +++ b/examples/pugl_management_demo.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/cairo.h" -#include "pugl/pugl.h" +#include <pugl/cairo.h> +#include <pugl/pugl.h> #include <cairo.h> diff --git a/examples/pugl_print_events.c b/examples/pugl_print_events.c index 7f5fe21..0ec4e65 100644 --- a/examples/pugl_print_events.c +++ b/examples/pugl_print_events.c @@ -3,8 +3,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <stdbool.h> #include <stdio.h> diff --git a/examples/pugl_shader_demo.app/MacOS/meson.build b/examples/pugl_shader_demo.app/MacOS/meson.build index 9507e17..5bdc06e 100644 --- a/examples/pugl_shader_demo.app/MacOS/meson.build +++ b/examples/pugl_shader_demo.app/MacOS/meson.build @@ -11,5 +11,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_gl_dep, dl_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_shader_demo.c b/examples/pugl_shader_demo.c index 209e8bd..d89cd7d 100644 --- a/examples/pugl_shader_demo.c +++ b/examples/pugl_shader_demo.c @@ -30,8 +30,8 @@ #include "glad/glad.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <math.h> #include <stddef.h> diff --git a/examples/pugl_vulkan_cpp_demo.app/MacOS/meson.build b/examples/pugl_vulkan_cpp_demo.app/MacOS/meson.build index 08078a0..5bb9729 100644 --- a/examples/pugl_vulkan_cpp_demo.app/MacOS/meson.build +++ b/examples/pugl_vulkan_cpp_demo.app/MacOS/meson.build @@ -10,5 +10,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [puglpp_dep, pugl_vulkan_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_vulkan_cpp_demo.cpp b/examples/pugl_vulkan_cpp_demo.cpp index 16f9778..9f1a3ed 100644 --- a/examples/pugl_vulkan_cpp_demo.cpp +++ b/examples/pugl_vulkan_cpp_demo.cpp @@ -22,9 +22,9 @@ #include "sybok.hpp" -#include "pugl/pugl.h" -#include "pugl/pugl.hpp" -#include "pugl/vulkan.hpp" +#include <pugl/pugl.h> +#include <pugl/pugl.hpp> +#include <pugl/vulkan.hpp> #include <vulkan/vk_platform.h> diff --git a/examples/pugl_vulkan_demo.app/MacOS/meson.build b/examples/pugl_vulkan_demo.app/MacOS/meson.build index 172b8a4..f7ef1a4 100644 --- a/examples/pugl_vulkan_demo.app/MacOS/meson.build +++ b/examples/pugl_vulkan_demo.app/MacOS/meson.build @@ -9,5 +9,4 @@ executable( ], c_args: example_defines + example_c_args, dependencies: [pugl_dep, pugl_vulkan_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_vulkan_demo.c b/examples/pugl_vulkan_demo.c index 6b9f03d..6c59af0 100644 --- a/examples/pugl_vulkan_demo.c +++ b/examples/pugl_vulkan_demo.c @@ -13,8 +13,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/vulkan.h" +#include <pugl/pugl.h> +#include <pugl/vulkan.h> #include <vulkan/vk_platform.h> #include <vulkan/vulkan_core.h> diff --git a/examples/pugl_window_demo.app/MacOS/meson.build b/examples/pugl_window_demo.app/MacOS/meson.build index d1f7b98..6c0f0de 100644 --- a/examples/pugl_window_demo.app/MacOS/meson.build +++ b/examples/pugl_window_demo.app/MacOS/meson.build @@ -7,5 +7,4 @@ executable( c_args: example_defines + example_c_args, cpp_args: example_defines + example_cpp_args, dependencies: [pugl_dep, pugl_gl_dep, puglutil_dep], - include_directories: include_directories('../../..'), ) diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c index 757c0f9..18755c3 100644 --- a/examples/pugl_window_demo.c +++ b/examples/pugl_window_demo.c @@ -10,8 +10,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <math.h> #include <stdbool.h> diff --git a/include/pugl/cairo.h b/include/pugl/cairo.h index fda1191..9a0eccf 100644 --- a/include/pugl/cairo.h +++ b/include/pugl/cairo.h @@ -4,8 +4,8 @@ #ifndef PUGL_CAIRO_H #define PUGL_CAIRO_H -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> PUGL_BEGIN_DECLS diff --git a/include/pugl/gl.h b/include/pugl/gl.h index ac7c557..9ea7cfe 100644 --- a/include/pugl/gl.h +++ b/include/pugl/gl.h @@ -4,8 +4,8 @@ #ifndef PUGL_GL_H #define PUGL_GL_H -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> // IWYU pragma: begin_exports diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 2e1cdce..0fb2bf7 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -4,7 +4,7 @@ #ifndef PUGL_PUGL_H #define PUGL_PUGL_H -#include "pugl/attributes.h" +#include <pugl/attributes.h> #include <stddef.h> #include <stdint.h> diff --git a/include/pugl/stub.h b/include/pugl/stub.h index 8bfe4d8..e81e56f 100644 --- a/include/pugl/stub.h +++ b/include/pugl/stub.h @@ -4,8 +4,8 @@ #ifndef PUGL_STUB_H #define PUGL_STUB_H -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> PUGL_BEGIN_DECLS diff --git a/include/pugl/vulkan.h b/include/pugl/vulkan.h index a26ca8a..73745ca 100644 --- a/include/pugl/vulkan.h +++ b/include/pugl/vulkan.h @@ -10,8 +10,8 @@ #ifndef PUGL_VULKAN_H #define PUGL_VULKAN_H -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> #include <vulkan/vulkan_core.h> diff --git a/meson.build b/meson.build index a0df352..0c43e1a 100644 --- a/meson.build +++ b/meson.build @@ -250,7 +250,7 @@ libpugl = library( pugl_dep = declare_dependency( compile_args: extra_c_args, dependencies: core_deps, - include_directories: ['include'], + include_directories: includes, link_with: libpugl, ) diff --git a/src/common.c b/src/common.c index 2e6e0e6..3206a96 100644 --- a/src/common.c +++ b/src/common.c @@ -8,7 +8,7 @@ #include "platform.h" #include "types.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <limits.h> #include <stdbool.h> diff --git a/src/internal.c b/src/internal.c index 36152c1..d75861f 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5,7 +5,7 @@ #include "types.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <assert.h> #include <stdbool.h> diff --git a/src/internal.h b/src/internal.h index 7387494..d6d91ea 100644 --- a/src/internal.h +++ b/src/internal.h @@ -9,8 +9,8 @@ #include "attributes.h" #include "types.h" -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> #include <stdbool.h> #include <stddef.h> @@ -5,7 +5,7 @@ #ifndef PUGL_SRC_MAC_H #define PUGL_SRC_MAC_H -#include "pugl/pugl.h" +#include <pugl/pugl.h> #import <Cocoa/Cocoa.h> @@ -10,7 +10,7 @@ #include "macros.h" #include "platform.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #import <Cocoa/Cocoa.h> diff --git a/src/mac_cairo.m b/src/mac_cairo.m index e4d2f5f..112b727 100644 --- a/src/mac_cairo.m +++ b/src/mac_cairo.m @@ -5,7 +5,7 @@ #include "mac.h" #include "stub.h" -#include "pugl/cairo.h" +#include <pugl/cairo.h> #include <cairo-quartz.h> diff --git a/src/mac_gl.m b/src/mac_gl.m index f177bf9..57dfc41 100644 --- a/src/mac_gl.m +++ b/src/mac_gl.m @@ -5,7 +5,7 @@ #include "mac.h" #include "stub.h" -#include "pugl/gl.h" +#include <pugl/gl.h> #ifndef __MAC_10_10 # define NSOpenGLProfileVersion4_1Core NSOpenGLProfileVersion3_2Core diff --git a/src/mac_stub.m b/src/mac_stub.m index 9ebedca..c7e4512 100644 --- a/src/mac_stub.m +++ b/src/mac_stub.m @@ -5,7 +5,7 @@ #include "mac.h" #include "stub.h" -#include "pugl/stub.h" +#include <pugl/stub.h> #import <Cocoa/Cocoa.h> diff --git a/src/mac_vulkan.m b/src/mac_vulkan.m index 4fdbaf6..f3563e2 100644 --- a/src/mac_vulkan.m +++ b/src/mac_vulkan.m @@ -8,9 +8,9 @@ #include "stub.h" #include "types.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" -#include "pugl/vulkan.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> +#include <pugl/vulkan.h> #include <vulkan/vulkan_core.h> #include <vulkan/vulkan_macos.h> diff --git a/src/platform.h b/src/platform.h index cfdb1b7..e1c71ed 100644 --- a/src/platform.h +++ b/src/platform.h @@ -8,7 +8,7 @@ #include "types.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> PUGL_BEGIN_DECLS @@ -4,7 +4,7 @@ #ifndef PUGL_SRC_STUB_H #define PUGL_SRC_STUB_H -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <stddef.h> diff --git a/src/types.h b/src/types.h index bbebbb7..05343f7 100644 --- a/src/types.h +++ b/src/types.h @@ -6,7 +6,7 @@ #include "attributes.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <stdbool.h> #include <stddef.h> @@ -7,7 +7,7 @@ #include "macros.h" #include "platform.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <dwmapi.h> #include <windows.h> @@ -6,7 +6,7 @@ #include "internal.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <windows.h> diff --git a/src/win_cairo.c b/src/win_cairo.c index 0aab254..873d395 100644 --- a/src/win_cairo.c +++ b/src/win_cairo.c @@ -5,7 +5,7 @@ #include "types.h" #include "win.h" -#include "pugl/cairo.h" +#include <pugl/cairo.h> #include <cairo-win32.h> #include <cairo.h> diff --git a/src/win_gl.c b/src/win_gl.c index 8607bdd..4f33e36 100644 --- a/src/win_gl.c +++ b/src/win_gl.c @@ -5,7 +5,7 @@ #include "types.h" #include "win.h" -#include "pugl/gl.h" +#include <pugl/gl.h> #include <windows.h> diff --git a/src/win_stub.c b/src/win_stub.c index e98357c..d2dc3f3 100644 --- a/src/win_stub.c +++ b/src/win_stub.c @@ -5,7 +5,7 @@ #include "types.h" #include "win.h" -#include "pugl/stub.h" +#include <pugl/stub.h> static PuglStatus puglWinStubConfigure(PuglView* view) diff --git a/src/win_vulkan.c b/src/win_vulkan.c index 2927447..bd3bf45 100644 --- a/src/win_vulkan.c +++ b/src/win_vulkan.c @@ -7,7 +7,7 @@ #include "types.h" #include "win.h" -#include "pugl/vulkan.h" +#include <pugl/vulkan.h> #include <vulkan/vulkan.h> #include <vulkan/vulkan_win32.h> @@ -11,7 +11,7 @@ #include "platform.h" #include "types.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <X11/X.h> #include <X11/Xatom.h> @@ -7,8 +7,8 @@ #include "attributes.h" #include "types.h" -#include "pugl/attributes.h" -#include "pugl/pugl.h" +#include <pugl/attributes.h> +#include <pugl/pugl.h> #include <X11/X.h> #include <X11/Xlib.h> diff --git a/src/x11_cairo.c b/src/x11_cairo.c index ff0b154..bc7b133 100644 --- a/src/x11_cairo.c +++ b/src/x11_cairo.c @@ -5,8 +5,8 @@ #include "types.h" #include "x11.h" -#include "pugl/cairo.h" -#include "pugl/pugl.h" +#include <pugl/cairo.h> +#include <pugl/pugl.h> #include <cairo-xlib.h> #include <cairo.h> diff --git a/src/x11_gl.c b/src/x11_gl.c index de22b34..c43cf9f 100644 --- a/src/x11_gl.c +++ b/src/x11_gl.c @@ -6,8 +6,8 @@ #include "types.h" #include "x11.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <GL/glx.h> #include <X11/X.h> diff --git a/src/x11_stub.c b/src/x11_stub.c index 844b4db..11143fe 100644 --- a/src/x11_stub.c +++ b/src/x11_stub.c @@ -1,13 +1,13 @@ // Copyright 2012-2021 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -#include "pugl/stub.h" +#include <pugl/stub.h> #include "stub.h" #include "types.h" #include "x11.h" -#include "pugl/pugl.h" +#include <pugl/pugl.h> const PuglBackend* puglStubBackend(void) diff --git a/src/x11_vulkan.c b/src/x11_vulkan.c index 834ac37..078e524 100644 --- a/src/x11_vulkan.c +++ b/src/x11_vulkan.c @@ -8,8 +8,8 @@ #include "types.h" #include "x11.h" -#include "pugl/pugl.h" -#include "pugl/vulkan.h" +#include <pugl/pugl.h> +#include <pugl/vulkan.h> #include <vulkan/vulkan_core.h> #include <vulkan/vulkan_xlib.h> diff --git a/subprojects/puglutil/include/puglutil/test_utils.h b/subprojects/puglutil/include/puglutil/test_utils.h index 4ebd985..6419e16 100644 --- a/subprojects/puglutil/include/puglutil/test_utils.h +++ b/subprojects/puglutil/include/puglutil/test_utils.h @@ -4,7 +4,7 @@ #ifndef TEST_TEST_UTILS_H #define TEST_TEST_UTILS_H -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <inttypes.h> #include <stdarg.h> diff --git a/test/.clang-tidy b/test/.clang-tidy index 456eb2e..4dbdc80 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -3,7 +3,6 @@ Checks: > -bugprone-multi-level-implicit-pointer-conversion, - -bugprone-suspicious-include, -cert-err33-c, -cert-err34-c, -clang-analyzer-optin.core.EnumCastOutOfRange, diff --git a/test/cpp/.clang-tidy b/test/cpp/.clang-tidy index 1d936a2..fe7d8ec 100644 --- a/test/cpp/.clang-tidy +++ b/test/cpp/.clang-tidy @@ -5,6 +5,7 @@ Checks: > -*-use-auto, -*-use-nullptr, -bugprone-easily-swappable-parameters, + -bugprone-suspicious-include, -cert-dcl50-cpp, -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-do-while, diff --git a/test/cpp/test_build.cpp b/test/cpp/test_build.cpp index 2f24c5f..2419be9 100644 --- a/test/cpp/test_build.cpp +++ b/test/cpp/test_build.cpp @@ -1,15 +1,13 @@ // Copyright 2020 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -/* - Tests that C++ headers compile without any warnings. -*/ +// Tests that C++ headers compile without any warnings -#include "pugl/cairo.hpp" // IWYU pragma: keep -#include "pugl/gl.hpp" // IWYU pragma: keep -#include "pugl/pugl.h" // IWYU pragma: keep -#include "pugl/pugl.hpp" // IWYU pragma: keep -#include "pugl/stub.hpp" // IWYU pragma: keep +#include <pugl/cairo.hpp> // IWYU pragma: keep +#include <pugl/gl.hpp> // IWYU pragma: keep +#include <pugl/pugl.h> // IWYU pragma: keep +#include <pugl/pugl.hpp> // IWYU pragma: keep +#include <pugl/stub.hpp> // IWYU pragma: keep int main() diff --git a/test/cpp/test_inline_cpp.cpp b/test/cpp/test_inline_cpp.cpp index f5694eb..4c47ffb 100644 --- a/test/cpp/test_inline_cpp.cpp +++ b/test/cpp/test_inline_cpp.cpp @@ -23,34 +23,34 @@ # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #endif -#include "../src/common.c" // IWYU pragma: keep -#include "../src/internal.c" // IWYU pragma: keep +#include "../../src/common.c" // IWYU pragma: keep +#include "../../src/internal.c" // IWYU pragma: keep #if defined(_WIN32) -# include "../src/win.c" // IWYU pragma: keep -# include "../src/win.h" // IWYU pragma: keep -# include "../src/win_stub.c" // IWYU pragma: keep +# include "../../src/win.c" // IWYU pragma: keep +# include "../../src/win.h" // IWYU pragma: keep +# include "../../src/win_stub.c" // IWYU pragma: keep # if defined(WITH_CAIRO) -# include "../src/win_cairo.c" // IWYU pragma: keep +# include "../../src/win_cairo.c" // IWYU pragma: keep # endif # if defined(WITH_OPENGL) -# include "../src/win_gl.c" // IWYU pragma: keep +# include "../../src/win_gl.c" // IWYU pragma: keep # endif # if defined(WITH_VULKAN) -# include "../src/win_vulkan.c" // IWYU pragma: keep +# include "../../src/win_vulkan.c" // IWYU pragma: keep # endif #else -# include "../src/x11.c" // IWYU pragma: keep -# include "../src/x11_stub.c" // IWYU pragma: keep +# include "../../src/x11.c" // IWYU pragma: keep +# include "../../src/x11_stub.c" // IWYU pragma: keep # if defined(WITH_CAIRO) -# include "../src/x11_cairo.c" // IWYU pragma: keep +# include "../../src/x11_cairo.c" // IWYU pragma: keep # endif # if defined(WITH_OPENGL) -# include "../src/x11_gl.c" // IWYU pragma: keep +# include "../../src/x11_gl.c" // IWYU pragma: keep # endif # if defined(WITH_VULKAN) -# include "../src/x11_vulkan.c" // IWYU pragma: keep +# include "../../src/x11_vulkan.c" // IWYU pragma: keep # endif #endif diff --git a/test/cpp/test_inline_objcpp.mm b/test/cpp/test_inline_objcpp.mm index 1c9079b..b4d65c6 100644 --- a/test/cpp/test_inline_objcpp.mm +++ b/test/cpp/test_inline_objcpp.mm @@ -9,22 +9,22 @@ # pragma clang diagnostic ignored "-Wold-style-cast" #endif -#include "../src/common.c" // IWYU pragma: keep -#include "../src/internal.c" // IWYU pragma: keep -#include "../src/mac.h" // IWYU pragma: keep -#include "../src/mac.m" // IWYU pragma: keep -#include "../src/mac_stub.m" // IWYU pragma: keep +#include "../../src/common.c" // IWYU pragma: keep +#include "../../src/internal.c" // IWYU pragma: keep +#include "../../src/mac.h" // IWYU pragma: keep +#include "../../src/mac.m" // IWYU pragma: keep +#include "../../src/mac_stub.m" // IWYU pragma: keep #if defined(WITH_CAIRO) -# include "../src/mac_cairo.m" // IWYU pragma: keep +# include "../../src/mac_cairo.m" // IWYU pragma: keep #endif #if defined(WITH_OPENGL) -# include "../src/mac_gl.m" // IWYU pragma: keep +# include "../../src/mac_gl.m" // IWYU pragma: keep #endif #if defined(WITH_VULKAN) -# include "../src/mac_vulkan.m" // IWYU pragma: keep +# include "../../src/mac_vulkan.m" // IWYU pragma: keep #endif #if defined(__clang__) diff --git a/test/meson.build b/test/meson.build index cd95c4a..5d67d4c 100644 --- a/test/meson.build +++ b/test/meson.build @@ -56,10 +56,6 @@ if with_timers basic_tests += ['timer'] endif -includes = [ - '../include', -] - foreach test : basic_tests test( test, @@ -68,7 +64,6 @@ foreach test : basic_tests 'test_@0@.c'.format(test), c_args: test_c_args, dependencies: [pugl_dep, pugl_stub_dep, puglutil_dep], - include_directories: include_directories(includes), ), suite: 'unit', ) @@ -82,7 +77,6 @@ foreach test : basic_exclusive_tests 'test_@0@.c'.format(test), c_args: test_c_args, dependencies: [pugl_dep, pugl_stub_dep, puglutil_dep], - include_directories: include_directories(includes), ), is_parallel: false, suite: 'unit', @@ -98,7 +92,6 @@ if opengl_dep.found() 'test_@0@.c'.format(test), c_args: test_c_args, dependencies: [pugl_dep, pugl_gl_dep, puglutil_dep], - include_directories: include_directories(includes), ), suite: 'unit', ) @@ -114,7 +107,6 @@ if cairo_dep.found() 'test_@0@.c'.format(test), c_args: test_c_args + cairo_args, dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep], - include_directories: include_directories(includes), ), suite: 'unit', ) @@ -130,7 +122,6 @@ if vulkan_dep.found() 'test_@0@.c'.format(test), c_args: test_c_args, dependencies: [pugl_dep, pugl_vulkan_dep, puglutil_dep], - include_directories: include_directories(includes), ), suite: 'unit', ) diff --git a/test/test_build.c b/test/test_build.c index 6365495..4f66eca 100644 --- a/test/test_build.c +++ b/test/test_build.c @@ -1,15 +1,13 @@ // Copyright 2020 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -/* - Tests that C headers compile without any warnings. -*/ +// Tests that C headers compile without any warnings -#include "pugl/cairo.h" // IWYU pragma: keep -#include "pugl/gl.h" // IWYU pragma: keep -#include "pugl/glu.h" // IWYU pragma: keep -#include "pugl/pugl.h" // IWYU pragma: keep -#include "pugl/stub.h" // IWYU pragma: keep +#include <pugl/cairo.h> // IWYU pragma: keep +#include <pugl/gl.h> // IWYU pragma: keep +#include <pugl/glu.h> // IWYU pragma: keep +#include <pugl/pugl.h> // IWYU pragma: keep +#include <pugl/stub.h> // IWYU pragma: keep int main(void) diff --git a/test/test_cairo.c b/test/test_cairo.c index b96996e..043edce 100644 --- a/test/test_cairo.c +++ b/test/test_cairo.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/cairo.h" -#include "pugl/pugl.h" +#include <pugl/cairo.h> +#include <pugl/pugl.h> #include <cairo.h> diff --git a/test/test_clipboard.c b/test/test_clipboard.c index debe8e3..054f71d 100644 --- a/test/test_clipboard.c +++ b/test/test_clipboard.c @@ -9,8 +9,8 @@ #include "test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_cursor.c b/test/test_cursor.c index 01b3301..f3a9e5f 100644 --- a/test/test_cursor.c +++ b/test/test_cursor.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_gl.c b/test/test_gl.c index 2747eef..ce85fa5 100644 --- a/test/test_gl.c +++ b/test/test_gl.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_gl_free_unrealized.c b/test/test_gl_free_unrealized.c index ba0d895..cdb94d6 100644 --- a/test/test_gl_free_unrealized.c +++ b/test/test_gl_free_unrealized.c @@ -9,8 +9,8 @@ #undef NDEBUG -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <assert.h> #include <stddef.h> diff --git a/test/test_gl_hints.c b/test/test_gl_hints.c index 9e31548..5ca5902 100644 --- a/test/test_gl_hints.c +++ b/test/test_gl_hints.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/gl.h" -#include "pugl/pugl.h" +#include <pugl/gl.h> +#include <pugl/pugl.h> #include <assert.h> diff --git a/test/test_local_copy_paste.c b/test/test_local_copy_paste.c index bfbfc38..606b2cf 100644 --- a/test/test_local_copy_paste.c +++ b/test/test_local_copy_paste.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_realize.c b/test/test_realize.c index 561e712..f15d1df 100644 --- a/test/test_realize.c +++ b/test/test_realize.c @@ -13,8 +13,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_redisplay.c b/test/test_redisplay.c index 19dd812..05f7e06 100644 --- a/test/test_redisplay.c +++ b/test/test_redisplay.c @@ -10,8 +10,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_remote_copy_paste.c b/test/test_remote_copy_paste.c index 3f0261b..46eefe9 100644 --- a/test/test_remote_copy_paste.c +++ b/test/test_remote_copy_paste.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_show_hide.c b/test/test_show_hide.c index c784ff0..6cc2f1b 100644 --- a/test/test_show_hide.c +++ b/test/test_show_hide.c @@ -10,8 +10,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_size.c b/test/test_size.c index 28bae1d..5c8eb04 100644 --- a/test/test_size.c +++ b/test/test_size.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_strerror.c b/test/test_strerror.c index c120a93..4bce4eb 100644 --- a/test/test_strerror.c +++ b/test/test_strerror.c @@ -5,7 +5,7 @@ #undef NDEBUG -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <assert.h> #include <ctype.h> diff --git a/test/test_stub.c b/test/test_stub.c index 11876f6..947cbd7 100644 --- a/test/test_stub.c +++ b/test/test_stub.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_stub_hints.c b/test/test_stub_hints.c index b726757..a84577d 100644 --- a/test/test_stub_hints.c +++ b/test/test_stub_hints.c @@ -9,8 +9,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> diff --git a/test/test_timer.c b/test/test_timer.c index 1ad0ee7..96aa50c 100644 --- a/test/test_timer.c +++ b/test/test_timer.c @@ -10,8 +10,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <math.h> diff --git a/test/test_update.c b/test/test_update.c index 3259438..520d4d6 100644 --- a/test/test_update.c +++ b/test/test_update.c @@ -10,8 +10,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_view.c b/test/test_view.c index b2423aa..48ace6f 100644 --- a/test/test_view.c +++ b/test/test_view.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/stub.h" +#include <pugl/pugl.h> +#include <pugl/stub.h> #include <assert.h> #include <stdbool.h> diff --git a/test/test_vulkan.c b/test/test_vulkan.c index ae76041..aed6684 100644 --- a/test/test_vulkan.c +++ b/test/test_vulkan.c @@ -7,8 +7,8 @@ #include "puglutil/test_utils.h" -#include "pugl/pugl.h" -#include "pugl/vulkan.h" +#include <pugl/pugl.h> +#include <pugl/vulkan.h> #include <vulkan/vulkan_core.h> diff --git a/test/test_world.c b/test/test_world.c index 18c8ef2..9d0d145 100644 --- a/test/test_world.c +++ b/test/test_world.c @@ -5,7 +5,7 @@ #undef NDEBUG -#include "pugl/pugl.h" +#include <pugl/pugl.h> #include <assert.h> #include <stdint.h> |