CMake не видит Qt6Config.cmake

не могу сбилдить проект с Qt, не находит конфигурационный файл Qt6Config.cmake, пути прописал правильные, вместо CMAKE_PREFIX_PATH уже писал Qt6_DIR как в ошибке и говорилось но все равно та же ошибка, гпт советовал в bashrc прописать export CMAKE_PREFIX_PATH="/usr/lib/cmake/Qt6" но тоже не помогло

cmake_minimum_required(VERSION 3.16)

project(typing-speedtest VERSION 1.0 LANGUAGES CXX)

list(APPEND CMAKE_PREFIX_PATH "/usr/lib/cmake/Qt6")  

find_package(Qt6 COMPONENTS Core Widgets REQUIRED)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(SOURCES
    main.cpp
    mainwindow.cpp
    mainwindow.h
    mainwindow.ui
)

add_executable(${PROJECT_NAME} ${SOURCES})

target_link_libraries(${PROJECT_NAME} Qt6::Core Qt6::Widgets)

Ошибка:

CMake Error at CMakeLists.txt:10 (find_package): By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt6", but CMake did not find one.

Could not find a package configuration file provided by "Qt6" with any of the following names: Qt6Config.cmake qt6-config.cmake Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed.


Ответы (0 шт):