if(TARGET Qt${QT_VERSION_MAJOR}::Widgets) add_subdirectory(widget) add_subdirectory(mainwindow) endif() if(TARGET Qt${QT_VERSION_MAJOR}::Quick) add_subdirectory(quick) endif()