meson: only build clapi tests when OpenGL is being built

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>
This commit is contained in:
Dylan Baker
2018-10-05 09:33:59 -07:00
parent 92f56fbd89
commit 0fa6a8271a
2 changed files with 2 additions and 2 deletions

View 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(

View 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(