diff options
author | Antonio Caggiano <antonio.caggiano@collabora.com> | 2021-04-09 17:27:12 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-05-03 21:08:47 +0000 |
commit | 1b87a7d5e06687026048a3cebea1a911f93d87f5 (patch) | |
tree | 711e6e6d85031b4a25b4f6b585dab97ad3ffce76 | |
parent | 390722620e139047c6b94f394caebb4c5676e6ce (diff) |
panfrost: Meson dependency
Declare a meson dependency for libpanfrost and wrap some key functions
within an extern C block allowing proper compilation by C++ compilers.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10462>
-rw-r--r-- | src/panfrost/lib/meson.build | 6 | ||||
-rw-r--r-- | src/panfrost/lib/pan_device.h | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/panfrost/lib/meson.build b/src/panfrost/lib/meson.build index b0ebff32ac3..d6f69364a12 100644 --- a/src/panfrost/lib/meson.build +++ b/src/panfrost/lib/meson.build @@ -80,3 +80,9 @@ libpanfrost_decode = static_library( gnu_symbol_visibility : 'hidden', build_by_default : false, ) + +libpanfrost_dep = declare_dependency( + link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_midgard, libpanfrost_bifrost], + include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw, inc_panfrost], + dependencies: [dep_libdrm, idep_nir, idep_midgard_pack], +) diff --git a/src/panfrost/lib/pan_device.h b/src/panfrost/lib/pan_device.h index 27f40eedf54..a6b40d4f508 100644 --- a/src/panfrost/lib/pan_device.h +++ b/src/panfrost/lib/pan_device.h @@ -42,6 +42,10 @@ #include <midgard_pack.h> +#if defined(__cplusplus) +extern "C" { +#endif + /* Driver limits */ #define PAN_MAX_CONST_BUFFERS 16 @@ -259,4 +263,8 @@ pan_is_bifrost(const struct panfrost_device *dev) return dev->arch >= 6 && dev->arch <= 7; } +#if defined(__cplusplus) +} // extern "C" +#endif + #endif |