meson: only build imgui when needed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 22 Nov 2019 11:16:50 +0000 (12:16 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 25 Nov 2019 07:51:56 +0000 (07:51 +0000)
Only required for Intel tools or the Vulkan overlay layer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
meson.build
src/intel/meson.build
src/meson.build
src/vulkan/meson.build

index 9585807fbee356b86e3380584977d51c37179cde..e8bec9bb3894ff854a97390f1cf120ca63d2d01e 100644 (file)
@@ -53,6 +53,7 @@ with_glx_read_only_text = get_option('glx-read-only-text')
 with_glx_direct = get_option('glx-direct')
 with_osmesa = get_option('osmesa')
 with_swr_arches = get_option('swr-arches')
 with_glx_direct = get_option('glx-direct')
 with_osmesa = get_option('osmesa')
 with_swr_arches = get_option('swr-arches')
+with_vulkan_overlay_layer = get_option('vulkan-overlay-layer')
 with_tools = get_option('tools')
 if with_tools.contains('all')
   with_tools = [
 with_tools = get_option('tools')
 if with_tools.contains('all')
   with_tools = [
@@ -69,6 +70,9 @@ if with_tools.contains('all')
   ]
 endif
 
   ]
 endif
 
+with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
+with_imgui = with_intel_tools or with_vulkan_overlay_layer
+
 dri_drivers_path = get_option('dri-drivers-path')
 if dri_drivers_path == ''
   dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
 dri_drivers_path = get_option('dri-drivers-path')
 if dri_drivers_path == ''
   dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
index 7b6aa40ba8d7ceaf8fbbcce71521d1493bee7c5e..528146f3bb74bb8ce05175e478600f2bdb17b7b8 100644 (file)
@@ -28,7 +28,7 @@ subdir('isl')
 subdir('common')
 subdir('compiler')
 subdir('perf')
 subdir('common')
 subdir('compiler')
 subdir('perf')
-if with_tools.contains('intel') or with_tools.contains('intel-ui')
+if with_intel_tools
   subdir('tools')
 endif
 if with_intel_vk
   subdir('tools')
 endif
 if with_intel_vk
index cefa1c9ac2803f6709b88d88d3829b600edff937..53b999ad22aeea92c917e2faffbd323a8f17c348 100644 (file)
@@ -60,7 +60,9 @@ subdir('compiler')
 if with_tools.contains('drm-shim')
   subdir('drm-shim')
 endif
 if with_tools.contains('drm-shim')
   subdir('drm-shim')
 endif
-subdir('imgui')
+if with_imgui
+  subdir('imgui')
+endif
 if with_platform_wayland
   subdir('egl/wayland/wayland-drm')
 endif
 if with_platform_wayland
   subdir('egl/wayland/wayland-drm')
 endif
index 7900938b3550040c8cbfb908b56c1eb9729e8b43..e1e8f753b504c53a7969fdb631aa42674f060116 100644 (file)
@@ -59,6 +59,6 @@ endif
 
 subdir('util')
 subdir('wsi')
 
 subdir('util')
 subdir('wsi')
-if get_option('vulkan-overlay-layer')
+if with_vulkan_overlay_layer
   subdir('overlay-layer')
 endif
   subdir('overlay-layer')
 endif