qt.version = $config.libbuild2_qt_tests.qt

using qt.uic

switch $qt.version
{
  case 0
    libs =
  case 5
    import libs = libQt5Widgets%lib{Qt5Widgets}
  case 6
    import libs = libQt6Widgets%lib{Qt6Widgets}
}

# Source file and libraries.
#
exe{driver}: cxx{driver} $libs
{
  # Don't show the UI.
  #
  test.options = --no-show-ui
}

# A uic-generated header.
#
exe{driver}: hxx{ui_foo}

# Generate ui_foo.hxx from foo.ui.
#
hxx{ui_foo}: ui{foo}

cxx.poptions += "-I$out_root"
