build: write .clangd with proper compile_commands path on configure

This commit is contained in:
2025-12-19 10:33:14 +03:00
parent 6ac9c03ec4
commit 82998d688c
3 changed files with 7 additions and 1 deletions

View File

@@ -10,6 +10,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
file(WRITE "${CMAKE_SOURCE_DIR}/.clangd"
"CompileFlags:
CompilationDatabase: ${CMAKE_BINARY_DIR}")
option(USE_SYSTEM_GLFW "Use system-installed GLFW instead of fetching it statically" OFF)
message(STATUS "USE_SYSTEM_GLFW: ${USE_SYSTEM_GLFW}")