#
# Unit tests for the nglapplication module (nglcoreapplication).
# One test executable per module, each registered with ctest.
#
if (NOT BUILD_TESTING)
  return()
endif()

# --- nglapplication: nglcoreapplication logger handler

if (TARGET nglcoreapplication)
  ADD_EXECUTABLE(nglcoreapplication_unit_test nglcoreapplication_unit_test.cpp)

  TARGET_COMPILE_DEFINITIONS(nglcoreapplication_unit_test PRIVATE BUILDING_NGLLOGGER)
  TARGET_LINK_LIBRARIES(nglcoreapplication_unit_test
    nglcoreapplication
    NGLLogger
    Qt6::Core
    Qt6::Test
  )
  ADD_TEST(NAME nglcoreapplication_unit_test COMMAND $<TARGET_FILE:nglcoreapplication_unit_test>)
endif()
