From 1b87a7d5e06687026048a3cebea1a911f93d87f5 Mon Sep 17 00:00:00 2001 From: Antonio Caggiano Date: Fri, 9 Apr 2021 17:27:12 +0200 Subject: [PATCH] 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 Acked-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/meson.build | 6 ++++++ src/panfrost/lib/pan_device.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/src/panfrost/lib/meson.build b/src/panfrost/lib/meson.build index b0ebff3..d6f6936 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 27f40ee..a6b40d4 100644 --- a/src/panfrost/lib/pan_device.h +++ b/src/panfrost/lib/pan_device.h @@ -42,6 +42,10 @@ #include +#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 -- 2.7.4