blob: 2fc834d9d50d535c194a234549937ab551d3122f [file] [log] [blame]
Joerg Sonnenberger340a1752013-09-25 10:37:32 +00001set(LLVM_NO_RTTI 1)
2
Zachary Turner7513e822015-02-17 22:20:20 +00003if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
Zachary Turner030b8cb2015-02-24 22:17:57 +00004 add_definitions( -DEXPORT_LIBLLDB )
Zachary Turner7513e822015-02-17 22:20:20 +00005endif()
6
Zachary Turner799770c2015-03-18 16:56:24 +00007# Include this so that add_lldb_library() has the list of dependencies
8# for liblldb to link against
9include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
10
11add_lldb_library(liblldb SHARED
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000012 SBAddress.cpp
Oleksiy Vyalov71d08b32015-02-16 00:04:19 +000013 SBAttachInfo.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000014 SBBlock.cpp
15 SBBreakpoint.cpp
16 SBBreakpointLocation.cpp
17 SBBroadcaster.cpp
18 SBCommandInterpreter.cpp
19 SBCommandReturnObject.cpp
20 SBCommunication.cpp
21 SBCompileUnit.cpp
22 SBData.cpp
23 SBDebugger.cpp
24 SBDeclaration.cpp
25 SBError.cpp
26 SBEvent.cpp
Chandler Carruthb8a4ecb2014-10-01 21:33:28 +000027 SBExecutionContext.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000028 SBExpressionOptions.cpp
29 SBFileSpec.cpp
30 SBFileSpecList.cpp
31 SBFrame.cpp
32 SBFunction.cpp
33 SBHostOS.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000034 SBInstruction.cpp
35 SBInstructionList.cpp
Ilia K7f836242015-04-28 12:51:16 +000036 SBLanguageRuntime.cpp
Oleksiy Vyalov1ef7b2c2015-02-04 23:19:15 +000037 SBLaunchInfo.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000038 SBLineEntry.cpp
39 SBListener.cpp
40 SBModule.cpp
41 SBModuleSpec.cpp
Ed Maste53414042013-11-21 14:38:22 +000042 SBPlatform.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000043 SBProcess.cpp
Jason Molenda5e8dce42013-12-13 00:29:16 +000044 SBQueue.cpp
45 SBQueueItem.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000046 SBSection.cpp
47 SBSourceManager.cpp
48 SBStream.cpp
49 SBStringList.cpp
50 SBSymbol.cpp
51 SBSymbolContext.cpp
52 SBSymbolContextList.cpp
53 SBTarget.cpp
54 SBThread.cpp
Kuba Breckaaaa0b812014-09-06 01:22:55 +000055 SBThreadCollection.cpp
Todd Fiala8a3716b2014-09-30 15:58:56 +000056 SBThreadPlan.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000057 SBType.cpp
58 SBTypeCategory.cpp
Todd Fiala732215f2014-06-02 20:55:29 +000059 SBTypeEnumMember.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000060 SBTypeFilter.cpp
61 SBTypeFormat.cpp
62 SBTypeNameSpecifier.cpp
63 SBTypeSummary.cpp
64 SBTypeSynthetic.cpp
65 SBValue.cpp
66 SBValueList.cpp
Zachary Turner51f96ee2015-02-17 17:55:50 +000067 SBVariablesOptions.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000068 SBWatchpoint.cpp
Todd Fiala802dc4022014-06-23 19:30:49 +000069 SBUnixSignals.cpp
Zachary Turnere6e2bb32015-03-31 21:03:22 +000070 SystemInitializerFull.cpp
Zachary Turner799770c2015-03-18 16:56:24 +000071 ${LLDB_WRAP_PYTHON}
72 ${LLDB_VERS_GENERATED_FILE}
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000073 )
Zachary Turner799770c2015-03-18 16:56:24 +000074
Zachary Turner2c1f46d2015-07-30 20:28:07 +000075# This should not be part of LLDBDependencies.cmake, because we don't
76# want every single library taking a dependency on the script interpreters.
77target_link_libraries(liblldb PRIVATE
78 lldbPluginScriptInterpreterNone
79 lldbPluginScriptInterpreterPython
80 )
81
Zachary Turner799770c2015-03-18 16:56:24 +000082set_target_properties(liblldb
83 PROPERTIES
84 VERSION ${LLDB_VERSION}
85 )
86
87if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
88 # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
89 # so only it needs to explicitly link against ${PYTHON_LIBRARY}
90 if (MSVC AND NOT LLDB_DISABLE_PYTHON)
91 target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
92 endif()
93else()
94 set_target_properties(liblldb
95 PROPERTIES
96 OUTPUT_NAME lldb
97 )
98endif()
99
100if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE)
101 add_dependencies(liblldb swig_wrapper)
102endif()
103target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
104