gz_get_libsources_and_unittests(sources gtest_sources)

gz_add_component(graphics SOURCES ${sources} GET_TARGET_NAME graphics_target)

target_link_libraries(${graphics_target}
  PUBLIC
    gz-math::gz-math
    gz-utils::gz-utils
  PRIVATE
    ${GzAssimp_LIBRARIES}
    TINYXML2::TINYXML2
)

# CDT does a few float comparisons that cause warnings
target_compile_options(${graphics_target} PRIVATE
    $<$<CXX_COMPILER_ID:GNU>:   -Wno-switch-default -Wno-float-equal>   # GCC
    $<$<CXX_COMPILER_ID:Clang>: -Wno-switch-default -Wno-float-equal>   # Clang
)

gz_build_tests(
  TYPE UNIT
  SOURCES ${gtest_sources}
  LIB_DEPS
    ${graphics_target}
    gz-common-testing
    TINYXML2::TINYXML2
)
