aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b86ed7..af52bce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,14 @@ endif()
include(WasmSetup.cmake)
JaulibSetup()
+if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.clangd)
+# Fixup clangd w/ absolute path
+set (gamp_clangd_source_args "-isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/src, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni/jau, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/test")
+set (gamp_clangd_source_args "${gamp_clangd_source_args} -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/src, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/test")
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/clangd.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/.clangd)
+endif()
+
# this is the library version, derived from git tag and revision
set (gamp_VERSION_MAJOR ${VERSION_MAJOR})
set (gamp_VERSION_MINOR ${VERSION_MINOR})