From 5f240a5f917bcfac07f632cafd4bc744b98f1231 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Wed, 12 Jul 2023 15:47:37 -0500 Subject: [PATCH] Only build integration tests if libraries exist (#523) Signed-off-by: Michael Carroll --- test/integration/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index a863807d2..ae5215847 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -5,6 +5,10 @@ if (SKIP_av OR INTERNAL_SKIP_av) list(REMOVE_ITEM tests video_encoder.cc) endif() +if (SKIP_graphics OR INTERNAL_SKIP_graphics) + list(REMOVE_ITEM tests mesh.cc) +endif() + gz_build_tests( TYPE INTEGRATION SOURCES ${tests} @@ -19,10 +23,12 @@ if(TARGET INTEGRATION_plugin) target_include_directories(INTEGRATION_plugin PRIVATE ${PROJECT_SOURCE_DIR}/test) endif() +# Graphics specific integration tests if(TARGET INTEGRATION_mesh) target_link_libraries(INTEGRATION_mesh ${PROJECT_LIBRARY_TARGET_NAME}-graphics) endif() +# AV specific integration tests if(TARGET INTEGRATION_encoder_timing) target_link_libraries(INTEGRATION_encoder_timing ${PROJECT_LIBRARY_TARGET_NAME}-av) endif()