xref: /llvm-project/lldb/source/Core/CMakeLists.txt (revision b852fb1ec5fa15f0b913cc4988cbd09239b19904)
1lldb_tablegen(CoreProperties.inc -gen-lldb-property-defs
2  SOURCE CoreProperties.td
3  TARGET LLDBCorePropertiesGen)
4
5lldb_tablegen(CorePropertiesEnum.inc -gen-lldb-property-enum-defs
6  SOURCE CoreProperties.td
7  TARGET LLDBCorePropertiesEnumGen)
8
9set(LLDB_CURSES_LIBS)
10set(LLDB_LIBEDIT_LIBS)
11
12if (LLDB_ENABLE_CURSES)
13  list(APPEND LLDB_CURSES_LIBS ${PANEL_LIBRARIES} ${CURSES_LIBRARIES})
14  if (LLVM_BUILD_STATIC)
15    list(APPEND LLDB_CURSES_LIBS gpm)
16  endif()
17endif()
18
19# TODO: Add property `NO_PLUGIN_DEPENDENCIES` to lldbCore
20add_lldb_library(lldbCore
21  Address.cpp
22  AddressRange.cpp
23  AddressRangeListImpl.cpp
24  AddressResolver.cpp
25  AddressResolverFileLine.cpp
26  Communication.cpp
27  DataFileCache.cpp
28  Debugger.cpp
29  DebuggerEvents.cpp
30  Declaration.cpp
31  Disassembler.cpp
32  DumpDataExtractor.cpp
33  DumpRegisterValue.cpp
34  DumpRegisterInfo.cpp
35  DynamicLoader.cpp
36  EmulateInstruction.cpp
37  FileLineResolver.cpp
38  FormatEntity.cpp
39  Highlighter.cpp
40  IOHandler.cpp
41  IOHandlerCursesGUI.cpp
42  Mangled.cpp
43  Module.cpp
44  ModuleChild.cpp
45  ModuleList.cpp
46  Opcode.cpp
47  PluginManager.cpp
48  Progress.cpp
49  RichManglingContext.cpp
50  SearchFilter.cpp
51  Section.cpp
52  SourceLocationSpec.cpp
53  SourceManager.cpp
54  StreamAsynchronousIO.cpp
55  ThreadedCommunication.cpp
56  UserSettingsController.cpp
57  Value.cpp
58
59  DEPENDS
60    clang-tablegen-targets
61
62  LINK_LIBS
63    lldbBreakpoint
64    lldbDataFormatters
65    lldbExpression
66    lldbHost
67    lldbInterpreter
68    lldbSymbol
69    lldbTarget
70    lldbUtility
71    lldbValueObject
72    lldbPluginCPlusPlusLanguage
73    lldbPluginObjCLanguage
74    ${LLDB_CURSES_LIBS}
75
76  CLANG_LIBS
77    clangDriver
78
79  LINK_COMPONENTS
80    Support
81    Demangle
82    TargetParser
83  )
84
85add_dependencies(lldbCore
86  LLDBCorePropertiesGen
87  LLDBCorePropertiesEnumGen)
88
89# Needed to properly resolve references in a debug build.
90# TODO: Remove once we have better layering
91set_target_properties(lldbCore PROPERTIES LINK_INTERFACE_MULTIPLICITY 5)
92
93if (LLDB_ENABLE_CURSES)
94  target_include_directories(lldbCore PRIVATE ${CURSES_INCLUDE_DIRS})
95endif()
96