simplify cmake logic for finding clang
which fixes the build on windows
This commit is contained in:
parent
87b8b69eb0
commit
f9992850a5
@ -7,35 +7,6 @@
|
||||
# CLANG_LIBRARIES
|
||||
# CLANG_LIBDIRS
|
||||
|
||||
if(MSVC)
|
||||
find_package(CLANG REQUIRED CONFIG)
|
||||
|
||||
set(CLANG_LIBRARIES
|
||||
clangFrontendTool
|
||||
clangCodeGen
|
||||
clangFrontend
|
||||
clangDriver
|
||||
clangSerialization
|
||||
clangSema
|
||||
clangStaticAnalyzerFrontend
|
||||
clangStaticAnalyzerCheckers
|
||||
clangStaticAnalyzerCore
|
||||
clangAnalysis
|
||||
clangASTMatchers
|
||||
clangAST
|
||||
clangParse
|
||||
clangSema
|
||||
clangBasic
|
||||
clangEdit
|
||||
clangLex
|
||||
clangARCMigrate
|
||||
clangRewriteFrontend
|
||||
clangRewrite
|
||||
clangCrossTU
|
||||
clangIndex
|
||||
)
|
||||
|
||||
else()
|
||||
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
|
||||
PATHS
|
||||
/usr/lib/llvm/10/include
|
||||
@ -83,7 +54,6 @@ else()
|
||||
FIND_AND_ADD_CLANG_LIB(clangRewrite)
|
||||
FIND_AND_ADD_CLANG_LIB(clangCrossTU)
|
||||
FIND_AND_ADD_CLANG_LIB(clangIndex)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CLANG DEFAULT_MSG CLANG_LIBRARIES CLANG_INCLUDE_DIRS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user