[pango/pango2: 159/168] Add support for C++ to Meson build definitions




commit 61a35044725dfdc0e12a4842e89e78d7f9391db2
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Thu Mar 10 16:15:14 2022 +0100

    Add support for C++ to Meson build definitions

 meson.build       | 3 ++-
 pango/meson.build | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 133e6f7c..8df9f96f 100644
--- a/meson.build
+++ b/meson.build
@@ -46,6 +46,7 @@ osx_current = pango_binary_age - pango_interface_age + 1
 pango_osxversion = [osx_current, '@0@.@1@.0'.format(osx_current, pango_interface_age)]
 
 cc = meson.get_compiler('c')
+cxx = meson.get_compiler('cpp')
 host_system = host_machine.system()
 
 # Compiler and linker flags
@@ -58,7 +59,7 @@ if cc.get_id() == 'msvc'
   # Compiler options taken from msvc_recommended_pragmas.h
   # in GLib, based on _Win32_Programming_ by Rector and Newcomer
   test_cflags = ['-FImsvc_recommended_pragmas.h', '-utf-8']
-  add_project_arguments(cc.get_supported_arguments(test_cflags), language: 'c')
+  add_project_arguments(cc.get_supported_arguments(test_cflags), language: ['c', 'cpp'])
   test_c_only_flags = []
 elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
   test_c_only_flags = [
diff --git a/pango/meson.build b/pango/meson.build
index 0fafbf7f..c307e66b 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -235,6 +235,7 @@ libpango = library(
   dependencies: pango_deps,
   include_directories: [ root_inc, pango_inc ],
   c_args: common_cflags + pango_debug_cflags + pango_cflags,
+  cpp_args: common_cflags + pango_debug_cflags + pango_cflags,
   link_args: common_ldflags,
 )
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]