mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 09:05:10 +00:00
Fix compile on Windows + MSYS2-MinGW64 (#46)
1. libClangDriver.a shipped by MSYS2 needs -lversion which is not included in CMAKE_CXX_STANDARD_LIBRARIES by default. 2. Use string literal for DEFAULT_RESOURCE_DIRECTORY to support backslashes in path.
This commit is contained in:
parent
7c1e3fc90e
commit
87f36a4a96
@ -124,7 +124,7 @@ endif()
|
|||||||
### Definitions
|
### Definitions
|
||||||
|
|
||||||
target_compile_definitions(ccls PRIVATE
|
target_compile_definitions(ccls PRIVATE
|
||||||
DEFAULT_RESOURCE_DIRECTORY="${Clang_RESOURCE_DIR}")
|
DEFAULT_RESOURCE_DIRECTORY=R"\(${Clang_RESOURCE_DIR}\)")
|
||||||
|
|
||||||
### Includes
|
### Includes
|
||||||
|
|
||||||
|
@ -137,4 +137,7 @@ if(Clang_FOUND AND NOT TARGET Clang::Clang)
|
|||||||
find_package(Curses REQUIRED)
|
find_package(Curses REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
set_property(TARGET Clang::Clang PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES "${_Clang_LIBRARIES};${CURSES_LIBRARIES};${ZLIB_LIBRARIES}")
|
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()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user