cmake_minimum_required(VERSION 3.16) project(SoundCardCheck LANGUAGES CXX) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) # e.g. C++17 or C++20 set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Multimedia) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Multimedia) add_executable(SoundCardCheck main.cpp ) target_link_libraries(SoundCardCheck Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Multimedia ) include(GNUInstallDirs) install(TARGETS SoundCardCheck LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )