meson: only build clapi tests when OpenGL is being built
authorDylan Baker <dylan@pnwbakers.com>
Fri, 5 Oct 2018 16:33:59 +0000 (09:33 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 9 Oct 2018 15:55:48 +0000 (08:55 -0700)
Otherwise building just vulkan (among other things) will build these
tests, pull in a bunch of stuff they shouldn't, and potentially fail to
compile.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/mapi/glapi/meson.build
src/mapi/shared-glapi/meson.build

index 2509e19eaa3a3bed07febbefe4ba709113b5786f..048bee8a1ad279f203e29ab6a112fcd691555be7 100644 (file)
@@ -78,7 +78,7 @@ libglapi_static = static_library(
   build_by_default : false,
 )
 
-if not with_shared_glapi and with_tests
+if with_any_opengl and not with_shared_glapi and with_tests
   test(
     'glapi_static_check_table',
     executable(
index 44e86f845f645505a4c4888cb5f11b92c6158ad6..dcc6079af3d6eee9928e7ae8137d862f06bbe6ac 100644 (file)
@@ -50,7 +50,7 @@ libglapi = shared_library(
   install : true,
 )
 
-if with_tests
+if with_any_opengl and with_tests
   test(
     'shared-glapi-test',
     executable(