From b279b2b672e335922e72bb663e42a7fb0f846f50 Mon Sep 17 00:00:00 2001 From: Leszek Swirski Date: Sat, 7 Dec 2013 13:53:15 +0000 Subject: [PATCH] Fix --system-libclang on Ubuntu/Debian --- cpp/ycm/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt index 67472895..13a7329d 100644 --- a/cpp/ycm/CMakeLists.txt +++ b/cpp/ycm/CMakeLists.txt @@ -184,12 +184,15 @@ if ( EXTERNAL_LIBCLANG_PATH OR USE_SYSTEM_LIBCLANG ) else () set( ENV_LIB_PATHS "" ) endif() + # On Debian-based systems, llvm installs into /usr/lib/llvm-x.y. + file( GLOB SYS_LLVM_PATHS "/usr/lib/llvm*/lib" ) # Need TEMP because find_library does not work with an option variable find_library( TEMP clang PATHS ${ENV_LIB_PATHS} /usr/lib /usr/lib/llvm + ${SYS_LLVM_PATHS} /Library/Developer/CommandLineTools/usr/lib ) set( EXTERNAL_LIBCLANG_PATH ${TEMP} ) else()