Fix qmlls & clang LSP issues
This makes cmake export the qmlls.ini settings for qmlls (lang server), which makes it aware of the C++ components used in the project. By default, qmlls wasn't able to find these as they lived in a separate build dir which it didn't know about. Additionally, this also enables exporting compile commands to provide better support for other editors that rely on these. Note that the compile_commands.json will still only be exported into the build dir though, so to make use of this, you'll probably want to symlink this from the build dir.
This commit is contained in:
parent
cb75fde6d7
commit
529753b078
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -29,6 +29,7 @@ Thumbs.db
|
||||||
*.rc
|
*.rc
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
/.qmake.stash
|
/.qmake.stash
|
||||||
|
compile_commands.json
|
||||||
|
|
||||||
# qtcreator generated files
|
# qtcreator generated files
|
||||||
*.pro.user*
|
*.pro.user*
|
||||||
|
|
|
@ -4,8 +4,10 @@ project(Solitare VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
set(QT_QML_GENERATE_QMLLS_INI ON)
|
||||||
|
|
||||||
|
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
|
||||||
qt_standard_project_setup(REQUIRES 6.5)
|
qt_standard_project_setup(REQUIRES 6.5)
|
||||||
|
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
Loading…
Reference in a new issue