Skip to content

Commit

Permalink
Only build integration tests if libraries exist (#523)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Jul 12, 2023
1 parent 6a0f9d7 commit 5f240a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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()
Expand Down

0 comments on commit 5f240a5

Please sign in to comment.