find_package(Qt${QT_VERSION_MAJOR} COMPONENTS PrintSupport QUIET)

if (Qt${QT_VERSION_MAJOR}PrintSupport_FOUND)
  project(QtTreeView)

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

  ignore_oiv_runtest()

  add_oiv_qt_executable(${PROJECT_NAME}
    QtTView.cxx
    QtTViewMainFrame.cxx
    QtTViewTreeView.cxx
    QtTViewViewer.cxx
    #Those includes will be automoced
    QtTViewMainFrame.h
    QtTViewTreeView.h
    QtTViewViewer.h
  )

  target_link_libraries(${PROJECT_NAME}
		${OpenInventorQt_LIBRARIES}
		${OpenInventorGui_LIBRARIES}
		Qt::PrintSupport
	)
  
endif()
