Update to libweston-9
[src/agl-compositor.git] / meson.build
index 34f8558..081b127 100644 (file)
@@ -1,6 +1,6 @@
 project('agl-compositor',
-  'c',
-  version: '0.0.18',
+  'c', 'cpp',
+  version: '0.0.19',
   default_options: [
     'warning_level=3',
     'c_std=gnu99',
@@ -10,11 +10,13 @@ project('agl-compositor',
 )
 
 config_h = configuration_data()
-agl_compositor_version = '0.0.18'
-libweston_version = 'libweston-8'
+agl_compositor_version = '0.0.19'
+libweston_version = 'libweston-9'
 pkgconfig = import('pkgconfig')
 
 cc = meson.get_compiler('c')
+cxx = meson.get_compiler('cpp')
+
 add_project_arguments(
   cc.get_supported_arguments([
     '-Wno-unused-parameter',
@@ -73,10 +75,11 @@ depnames_waltham = [
 deps_waltham = []
 foreach depname : depnames_waltham
   dep = dependency(depname, required: false)
-  if not dep.found()
+  if dep.found()
+    deps_waltham += dep
+  else
     message('Waltham requires @0@ which was not found. '.format(depname))
   endif
-  deps_waltham += dep
 endforeach
 
 deps_waltham += deps_remoting
@@ -151,7 +154,7 @@ libweston_dep = dependency(libweston_version)
 deps_libweston = [
   dependency('wayland-server'),
   libweston_dep,
-  dependency('libweston-desktop-8'),
+  dependency('libweston-desktop-9'),
   local_dep,
 ]
 
@@ -181,6 +184,10 @@ if policy_to_install == 'auto' or policy_to_install == 'allow-all'
 elif policy_to_install == 'deny-all'
   srcs_agl_compositor += 'src/policy-deny.c'
   message('Installing deny all policy')
+elif policy_to_install == 'rba'
+  srcs_agl_compositor += ['src/policy-rba.c', 'src/rba_adapter.cpp']
+  deps_libweston += dependency('librba')
+  message('Installing rba policy')
 endif
 
 
@@ -189,9 +196,14 @@ endif
 # '-I/extra/include/dir, but this should only be used in exceptional cases for
 # includes that can't be detected via pkg-config and passed via dependencies.
 if libweston_dep.found()
-  if not prefix_path.contains('/usr')
-    dir_path_x11_backend = join_paths(prefix_path, 'include', libweston_version, 'libweston', 'backend-x11.h')
+  if not meson.is_cross_build()
+    if not prefix_path.contains('/usr')
+      dir_path_x11_backend = join_paths(prefix_path, 'include', libweston_version, 'libweston', 'backend-x11.h')
+    else
+      dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h')
+    endif
   else
+    message('Building with cross environment')
     dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h')
   endif