diff --git a/CMakeLists.txt b/CMakeLists.txt index b3306340..faa640b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,7 @@ endif() ### Definitions target_compile_definitions(ccls PRIVATE - DEFAULT_RESOURCE_DIRECTORY="${Clang_RESOURCE_DIR}") + DEFAULT_RESOURCE_DIRECTORY=R"\(${Clang_RESOURCE_DIR}\)") ### Includes diff --git a/cmake/FindClang.cmake b/cmake/FindClang.cmake index 6c4f4153..e4286d51 100644 --- a/cmake/FindClang.cmake +++ b/cmake/FindClang.cmake @@ -137,4 +137,7 @@ if(Clang_FOUND AND NOT TARGET Clang::Clang) find_package(Curses REQUIRED) find_package(ZLIB REQUIRED) set_property(TARGET Clang::Clang PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES "${_Clang_LIBRARIES};${CURSES_LIBRARIES};${ZLIB_LIBRARIES}") + if(MINGW) + set_property(TARGET Clang::Clang APPEND_STRING PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ";version") + endif() endif()