2012-08-09 21:17:01 +04:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
|
|
asmparser
|
2011-02-20 02:03:58 +03:00
|
|
|
support
|
2010-09-14 03:54:41 +04:00
|
|
|
mc
|
|
|
|
)
|
|
|
|
|
2011-03-13 18:10:24 +03:00
|
|
|
set(SOURCES
|
2011-07-10 00:00:58 +04:00
|
|
|
ARCMigrate.cpp
|
2010-01-05 22:32:54 +03:00
|
|
|
CIndex.cpp
|
2010-08-28 01:34:58 +04:00
|
|
|
CIndexCXX.cpp
|
2010-01-06 01:06:45 +03:00
|
|
|
CIndexCodeCompletion.cpp
|
2010-01-28 03:27:43 +03:00
|
|
|
CIndexDiagnostic.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CIndexDiagnostic.h
|
2011-10-06 11:00:54 +04:00
|
|
|
CIndexHigh.cpp
|
2010-01-26 22:31:51 +03:00
|
|
|
CIndexInclusionStack.cpp
|
2010-01-06 01:06:45 +03:00
|
|
|
CIndexUSRs.cpp
|
2010-01-05 22:32:54 +03:00
|
|
|
CIndexer.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CIndexer.h
|
2012-07-21 01:34:34 +04:00
|
|
|
CXComment.cpp
|
2010-01-15 23:35:54 +03:00
|
|
|
CXCursor.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CXCursor.h
|
2012-07-01 00:43:43 +04:00
|
|
|
CXCompilationDatabase.cpp
|
2011-11-10 12:43:12 +04:00
|
|
|
CXLoadedDiagnostic.cpp
|
|
|
|
CXLoadedDiagnostic.h
|
2011-11-01 02:05:42 +04:00
|
|
|
CXSourceLocation.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CXSourceLocation.h
|
|
|
|
CXStoredDiagnostic.cpp
|
2010-11-16 04:56:27 +03:00
|
|
|
CXString.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CXString.h
|
|
|
|
CXTranslationUnit.h
|
2010-08-26 05:42:22 +04:00
|
|
|
CXType.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
CXType.h
|
2011-10-17 23:48:19 +04:00
|
|
|
IndexBody.cpp
|
|
|
|
IndexDecl.cpp
|
|
|
|
IndexTypeSourceInfo.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
Index_Internal.h
|
2011-10-17 23:48:19 +04:00
|
|
|
Indexing.cpp
|
|
|
|
IndexingContext.cpp
|
2011-11-01 01:40:19 +04:00
|
|
|
IndexingContext.h
|
2010-02-18 07:01:41 +03:00
|
|
|
../../include/clang-c/Index.h
|
2011-03-13 18:10:24 +03:00
|
|
|
)
|
2011-03-13 01:01:58 +03:00
|
|
|
|
2012-06-21 05:30:21 +04:00
|
|
|
set(LIBRARIES
|
|
|
|
clangARCMigrate
|
|
|
|
clangRewrite
|
|
|
|
clangFrontend
|
|
|
|
clangDriver
|
|
|
|
clangSerialization
|
|
|
|
clangSema
|
|
|
|
clangEdit
|
|
|
|
clangAST
|
|
|
|
clangLex
|
2012-06-30 15:27:57 +04:00
|
|
|
clangTooling
|
2012-06-21 05:30:21 +04:00
|
|
|
clangBasic
|
|
|
|
)
|
|
|
|
|
2012-07-27 10:17:56 +04:00
|
|
|
set(GENERATED_HEADERS
|
|
|
|
ClangAttrClasses
|
|
|
|
ClangAttrList
|
|
|
|
ClangAttrParsedAttrList
|
|
|
|
ClangCommentNodes
|
|
|
|
ClangDiagnosticCommon
|
|
|
|
ClangDiagnosticFrontend
|
|
|
|
ClangDeclNodes
|
|
|
|
ClangStmtNodes
|
|
|
|
)
|
|
|
|
|
2011-03-13 18:10:24 +03:00
|
|
|
if( LLVM_ENABLE_PIC )
|
|
|
|
set(SHARED_LIBRARY TRUE)
|
|
|
|
add_clang_library(libclang ${SOURCES})
|
2012-06-21 05:30:21 +04:00
|
|
|
target_link_libraries(libclang ${LIBRARIES})
|
2012-07-27 10:17:56 +04:00
|
|
|
add_dependencies(libclang ${GENERATED_HEADERS})
|
2011-03-13 01:01:58 +03:00
|
|
|
|
2012-05-15 12:58:48 +04:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(libclang
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME "libclang"
|
|
|
|
VERSION ${LIBCLANG_LIBRARY_VERSION}
|
|
|
|
DEFINE_SYMBOL _CINDEX_LIB_)
|
|
|
|
else()
|
|
|
|
set_target_properties(libclang
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME "clang"
|
|
|
|
VERSION ${LIBCLANG_LIBRARY_VERSION}
|
|
|
|
DEFINE_SYMBOL _CINDEX_LIB_)
|
|
|
|
endif()
|
2011-03-13 18:10:24 +03:00
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2011-03-14 17:32:16 +03:00
|
|
|
set(LIBCLANG_LINK_FLAGS
|
2012-04-21 02:07:11 +04:00
|
|
|
"-Wl,-compatibility_version -Wl,1 -Wl,-dead_strip")
|
2011-03-13 18:10:24 +03:00
|
|
|
set_target_properties(libclang
|
|
|
|
PROPERTIES
|
|
|
|
LINK_FLAGS "${LIBCLANG_LINK_FLAGS}"
|
|
|
|
INSTALL_NAME_DIR "@executable_path/../lib")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
set(LIBCLANG_STATIC_TARGET_NAME libclang_static)
|
|
|
|
else()
|
|
|
|
set(LIBCLANG_STATIC_TARGET_NAME libclang)
|
2011-03-13 01:01:58 +03:00
|
|
|
endif()
|
2011-03-13 07:28:29 +03:00
|
|
|
|
2011-03-13 18:10:24 +03:00
|
|
|
if( NOT BUILD_SHARED_LIBS AND NOT WIN32 )
|
|
|
|
add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES})
|
2012-06-21 05:30:21 +04:00
|
|
|
target_link_libraries(${LIBCLANG_STATIC_TARGET_NAME} ${LIBRARIES})
|
2012-07-27 10:17:56 +04:00
|
|
|
add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS})
|
2011-03-13 18:10:24 +03:00
|
|
|
|
|
|
|
set_target_properties(${LIBCLANG_STATIC_TARGET_NAME}
|
|
|
|
PROPERTIES
|
2012-05-15 12:58:48 +04:00
|
|
|
OUTPUT_NAME "clang")
|
2011-03-13 18:10:24 +03:00
|
|
|
endif()
|