find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets OpenGL QUIET)

if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
  project(QtRenderAreaOrbiter)

  #Ask CMake to automoc needed includes
  set(CMAKE_AUTOMOC ON)
  set(CMAKE_INCLUDE_CURRENT_DIR ON)

  # Cause we need to find RenderArea.h
  include_directories(../..)

  add_oiv_qt_executable(${PROJECT_NAME}
    main.cxx
  )

  target_link_libraries(${PROJECT_NAME}
    ${OpenInventorQtViewerComponents_LIBRARIES}
    Qt::Widgets Qt::OpenGL
  )
endif()
