Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 1 | set(LLVM_USED_LIBS |
Argyrios Kyrtzidis | 69325d5 | 2011-07-09 20:00:58 +0000 | [diff] [blame] | 2 | clangARCMigrate |
Argyrios Kyrtzidis | 9621019 | 2011-07-09 21:35:58 +0000 | [diff] [blame] | 3 | clangRewrite |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 4 | clangFrontend |
| 5 | clangDriver |
| 6 | clangSerialization |
| 7 | clangIndex |
| 8 | clangSema |
Ted Kremenek | 30660a8 | 2012-03-06 20:06:33 +0000 | [diff] [blame^] | 9 | clangEdit |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 10 | clangAST |
| 11 | clangLex |
| 12 | clangBasic) |
| 13 | |
| 14 | set( LLVM_LINK_COMPONENTS |
Peter Collingbourne | 4b93d66 | 2011-02-19 23:03:58 +0000 | [diff] [blame] | 15 | support |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 16 | mc |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 17 | ) |
| 18 | |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 19 | set(SOURCES |
Argyrios Kyrtzidis | 69325d5 | 2011-07-09 20:00:58 +0000 | [diff] [blame] | 20 | ARCMigrate.cpp |
Ted Kremenek | ab18893 | 2010-01-05 19:32:54 +0000 | [diff] [blame] | 21 | CIndex.cpp |
Ted Kremenek | 3064ef9 | 2010-08-27 21:34:58 +0000 | [diff] [blame] | 22 | CIndexCXX.cpp |
Ted Kremenek | 1b6869a | 2010-01-05 22:06:45 +0000 | [diff] [blame] | 23 | CIndexCodeCompletion.cpp |
Douglas Gregor | 5352ac0 | 2010-01-28 00:27:43 +0000 | [diff] [blame] | 24 | CIndexDiagnostic.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 25 | CIndexDiagnostic.h |
Argyrios Kyrtzidis | aed123e | 2011-10-06 07:00:54 +0000 | [diff] [blame] | 26 | CIndexHigh.cpp |
Ted Kremenek | 16b55a7 | 2010-01-26 19:31:51 +0000 | [diff] [blame] | 27 | CIndexInclusionStack.cpp |
Ted Kremenek | 1b6869a | 2010-01-05 22:06:45 +0000 | [diff] [blame] | 28 | CIndexUSRs.cpp |
Ted Kremenek | ab18893 | 2010-01-05 19:32:54 +0000 | [diff] [blame] | 29 | CIndexer.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 30 | CIndexer.h |
Ted Kremenek | 16c440a | 2010-01-15 20:35:54 +0000 | [diff] [blame] | 31 | CXCursor.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 32 | CXCursor.h |
Ted Kremenek | 1532217 | 2011-11-10 08:43:12 +0000 | [diff] [blame] | 33 | CXLoadedDiagnostic.cpp |
| 34 | CXLoadedDiagnostic.h |
Ted Kremenek | 3ddef06 | 2011-10-31 22:05:42 +0000 | [diff] [blame] | 35 | CXSourceLocation.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 36 | CXSourceLocation.h |
| 37 | CXStoredDiagnostic.cpp |
Ted Kremenek | ed12273 | 2010-11-16 01:56:27 +0000 | [diff] [blame] | 38 | CXString.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 39 | CXString.h |
| 40 | CXTranslationUnit.h |
Ted Kremenek | 95f3355 | 2010-08-26 01:42:22 +0000 | [diff] [blame] | 41 | CXType.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 42 | CXType.h |
Argyrios Kyrtzidis | 4e7064f | 2011-10-17 19:48:19 +0000 | [diff] [blame] | 43 | IndexBody.cpp |
| 44 | IndexDecl.cpp |
| 45 | IndexTypeSourceInfo.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 46 | Index_Internal.h |
Argyrios Kyrtzidis | 4e7064f | 2011-10-17 19:48:19 +0000 | [diff] [blame] | 47 | Indexing.cpp |
| 48 | IndexingContext.cpp |
Ted Kremenek | 1edabbc | 2011-10-31 21:40:19 +0000 | [diff] [blame] | 49 | IndexingContext.h |
Douglas Gregor | f14bee8 | 2010-02-18 04:01:41 +0000 | [diff] [blame] | 50 | ../../include/clang-c/Index.h |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 51 | ) |
Douglas Gregor | ac47bc7 | 2009-09-25 06:35:15 +0000 | [diff] [blame] | 52 | |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 53 | if( LLVM_ENABLE_PIC ) |
| 54 | set(SHARED_LIBRARY TRUE) |
| 55 | add_clang_library(libclang ${SOURCES}) |
Douglas Gregor | 73dfa3d | 2010-08-02 20:52:32 +0000 | [diff] [blame] | 56 | |
Daniel Dunbar | f51f20f | 2010-04-30 21:51:10 +0000 | [diff] [blame] | 57 | set_target_properties(libclang |
Douglas Gregor | ac47bc7 | 2009-09-25 06:35:15 +0000 | [diff] [blame] | 58 | PROPERTIES |
Oscar Fuentes | 4656b63 | 2011-04-10 02:29:27 +0000 | [diff] [blame] | 59 | OUTPUT_NAME "libclang" |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 60 | VERSION ${LIBCLANG_LIBRARY_VERSION} |
| 61 | DEFINE_SYMBOL _CINDEX_LIB_) |
| 62 | |
| 63 | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
Oscar Fuentes | 6656457 | 2011-03-14 14:32:16 +0000 | [diff] [blame] | 64 | set(LIBCLANG_LINK_FLAGS |
| 65 | "-Wl,-compatibility_version -Wl,1 -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000") |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 66 | set_target_properties(libclang |
| 67 | PROPERTIES |
| 68 | LINK_FLAGS "${LIBCLANG_LINK_FLAGS}" |
| 69 | INSTALL_NAME_DIR "@executable_path/../lib") |
| 70 | endif() |
| 71 | |
| 72 | if(MSVC) |
| 73 | # windows.h doesn't compile with /Za |
| 74 | get_target_property(NON_ANSI_COMPILE_FLAGS libclang COMPILE_FLAGS) |
| 75 | string(REPLACE "/Za" "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS}) |
| 76 | set_target_properties(libclang PROPERTIES |
| 77 | COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS}) |
| 78 | endif() |
| 79 | |
| 80 | set(LIBCLANG_STATIC_TARGET_NAME libclang_static) |
| 81 | else() |
| 82 | set(LIBCLANG_STATIC_TARGET_NAME libclang) |
Douglas Gregor | ac47bc7 | 2009-09-25 06:35:15 +0000 | [diff] [blame] | 83 | endif() |
Douglas Gregor | 2588830 | 2009-10-05 22:25:29 +0000 | [diff] [blame] | 84 | |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 85 | if( NOT BUILD_SHARED_LIBS AND NOT WIN32 ) |
| 86 | add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES}) |
Douglas Gregor | 8435bf9 | 2011-02-25 19:24:02 +0000 | [diff] [blame] | 87 | |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 88 | set_target_properties(${LIBCLANG_STATIC_TARGET_NAME} |
| 89 | PROPERTIES |
Oscar Fuentes | 4656b63 | 2011-04-10 02:29:27 +0000 | [diff] [blame] | 90 | OUTPUT_NAME "libclang") |
Oscar Fuentes | 0b34dba | 2011-03-13 15:10:24 +0000 | [diff] [blame] | 91 | endif() |