find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets QUIET)

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

  #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}
    main.cxx
    QtCustomViewer.cxx
    QtCustomViewer.h
  )

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

