set(IntegrationTestSources
        IntegrationTest.hpp
        IntegrationTest.cpp
        player_metadata_test.hpp
        player_state_test.hpp
        player_quality_test.hpp
        player_test_base.hpp
        player_test_base.cpp
        player_test_timeout.hpp
        player_timed_test.hpp
        player_analytics_event_test.hpp
        TestStreamConfig.hpp
        TestStreamConfig.cpp
        TestOptions.hpp
        TestOptions.cpp
        )

if(TARGET_PLATFORM STREQUAL "PS4" OR TARGET_PLATFORM STREQUAL "XboxOne")
  list(APPEND IntegrationTestSources
      async_player_test.hpp
  )
endif()

add_library(integrationtest ${IntegrationTestSources})
target_include_directories(integrationtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(integrationtest
        testframework
        gtest
        optionparser
        testenv
        testutil
        json11
        )
set_folder_property(integrationtest)

if(TARGET_PLATFORM STREQUAL "Android")
  add_subdirectory(app/android)
elseif(TARGET_PLATFORM STREQUAL "iPhone" OR TARGET_PLATFORM STREQUAL "AppleTV")
  add_subdirectory(app/ios)
elseif(TARGET_PLATFORM STREQUAL "OSX")
  add_subdirectory(app/macos)
elseif(TARGET_PLATFORM STREQUAL "PS4")
  add_subdirectory(app/ps4)
elseif(TARGET_PLATFORM STREQUAL "WinStore" OR TARGET_PLATFORM STREQUAL "XboxOne")
  add_subdirectory(app/uwp)
elseif(TARGET_PLATFORM STREQUAL "Web")
  add_subdirectory(app/web)
endif()
