2009-09-25 10:35:15 +04:00
|
|
|
set(SHARED_LIBRARY TRUE)
|
|
|
|
|
|
|
|
set(LLVM_NO_RTTI 1)
|
|
|
|
|
|
|
|
set(LLVM_USED_LIBS
|
2010-06-08 23:23:49 +04:00
|
|
|
clangFrontend
|
2009-12-03 00:47:55 +03:00
|
|
|
clangDriver
|
2010-08-18 00:43:28 +04:00
|
|
|
clangSerialization
|
2010-08-20 22:27:03 +04:00
|
|
|
clangParse
|
2009-12-03 00:47:55 +03:00
|
|
|
clangSema
|
|
|
|
clangAnalysis
|
|
|
|
clangAST
|
|
|
|
clangLex
|
|
|
|
clangBasic)
|
2009-09-25 10:35:15 +04:00
|
|
|
|
|
|
|
set( LLVM_LINK_COMPONENTS
|
2009-12-03 00:47:55 +03:00
|
|
|
bitreader
|
|
|
|
mc
|
|
|
|
core
|
2009-09-25 10:35:15 +04:00
|
|
|
)
|
|
|
|
|
2010-05-01 01:51:10 +04:00
|
|
|
add_clang_library(libclang
|
2010-01-05 22:32:54 +03:00
|
|
|
CIndex.cpp
|
2010-01-06 01:06:45 +03:00
|
|
|
CIndexCodeCompletion.cpp
|
2010-01-28 03:27:43 +03:00
|
|
|
CIndexDiagnostic.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
|
2010-01-15 23:35:54 +03:00
|
|
|
CXCursor.cpp
|
2010-08-26 05:42:22 +04:00
|
|
|
CXType.cpp
|
2010-02-18 07:01:41 +03:00
|
|
|
../../include/clang-c/Index.h
|
2010-01-06 01:06:45 +03:00
|
|
|
)
|
2009-09-25 10:35:15 +04:00
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2010-08-03 00:52:32 +04:00
|
|
|
# dylib versioning information
|
|
|
|
# FIXME: Is there a more CMake-ish way to handle this?
|
|
|
|
set(LIBCLANG_VERSION 1
|
|
|
|
CACHE STRING "Version number of the libclang library")
|
|
|
|
set(LIBCLANG_SUBVERSION 0
|
|
|
|
CACHE STRING "Minor version number of the libclang library")
|
|
|
|
set(LIBCLANG_LINK_FLAGS
|
|
|
|
"-Wl,-current_version -Wl,${LIBCLANG_VERSION}.${LIBCLANG_SUBVERSION} -Wl,-compatibility_version -Wl,1")
|
|
|
|
|
|
|
|
set(LIBCLANG_LINK_FLAGS
|
2010-08-06 15:08:45 +04:00
|
|
|
"${LIBCLANG_LINK_FLAGS} -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000")
|
2009-09-25 10:35:15 +04:00
|
|
|
|
2010-05-01 01:51:10 +04:00
|
|
|
set_target_properties(libclang
|
2009-09-25 10:35:15 +04:00
|
|
|
PROPERTIES
|
2010-08-03 00:52:32 +04:00
|
|
|
LINK_FLAGS "${LIBCLANG_LINK_FLAGS}"
|
|
|
|
INSTALL_NAME_DIR "@executable_path/../lib")
|
2009-09-25 10:35:15 +04:00
|
|
|
endif()
|
2009-10-06 02:25:29 +04:00
|
|
|
|
2009-10-18 23:59:44 +04:00
|
|
|
if(MSVC)
|
|
|
|
# windows.h doesn't compile with /Za
|
2010-05-01 04:06:42 +04:00
|
|
|
get_target_property(NON_ANSI_COMPILE_FLAGS libclang COMPILE_FLAGS)
|
2009-10-18 23:59:44 +04:00
|
|
|
string(REPLACE /Za "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
2010-05-01 01:51:10 +04:00
|
|
|
set_target_properties(libclang PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
2009-10-18 23:59:44 +04:00
|
|
|
endif(MSVC)
|
|
|
|
|
2010-05-01 01:51:10 +04:00
|
|
|
set_target_properties(libclang
|
2009-10-06 02:25:29 +04:00
|
|
|
PROPERTIES
|
2010-03-22 18:44:38 +03:00
|
|
|
LINKER_LANGUAGE CXX
|
|
|
|
DEFINE_SYMBOL _CINDEX_LIB_)
|