build: fix finding llvm and clang 7

This commit is contained in:
Andrew Kelley 2018-09-19 15:38:36 -04:00
parent e3d8cae35a
commit 287f5cce50
No known key found for this signature in database
GPG Key ID: 4E7CD66038A4D47C
3 changed files with 5 additions and 3 deletions

View File

@ -4,4 +4,4 @@ set -x
sudo apt-get remove -y llvm-*
sudo rm -rf /usr/local/*
sudo apt-get install -y clang-7 libclang-7-dev llvm-7 llvm-7-dev cmake s3cmd
sudo apt-get install -y libxml2-dev clang-7 libclang-7-dev llvm-7 llvm-7-dev cmake s3cmd

View File

@ -28,6 +28,7 @@ else()
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
PATHS
/usr/lib/llvm/7/include
/usr/lib/llvm-7/include
/usr/lib/llvm-7.0/include
/mingw64/include)
@ -37,6 +38,7 @@ else()
PATHS
${CLANG_LIBDIRS}
/usr/lib/llvm/7/lib
/usr/lib/llvm-7/lib
/usr/lib/llvm-7.0/lib
/mingw64/lib
/c/msys64/mingw64/lib

View File

@ -8,7 +8,7 @@
# LLVM_LIBDIRS
find_program(LLVM_CONFIG_EXE
NAMES llvm-config llvm-config-7.0
NAMES llvm-config llvm-config-7 llvm-config-7.0
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
@ -62,7 +62,7 @@ execute_process(
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
if(NOT LLVM_LIBRARIES)
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-7.0 LLVM-7)
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-7 LLVM-7.0)
endif()
link_directories("${CMAKE_PREFIX_PATH}/lib")