blob: e26413f759b70d842c41af7955d8bf4cf5d0c99c [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
Oleksiy Vyalov1ef7b2c2015-02-04 23:19:15 +000036 SBLaunchInfo.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000037 SBLineEntry.cpp
38 SBListener.cpp
39 SBModule.cpp
40 SBModuleSpec.cpp
Ed Maste53414042013-11-21 14:38:22 +000041 SBPlatform.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000042 SBProcess.cpp
Jason Molenda5e8dce42013-12-13 00:29:16 +000043 SBQueue.cpp
44 SBQueueItem.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000045 SBSection.cpp
46 SBSourceManager.cpp
47 SBStream.cpp
48 SBStringList.cpp
49 SBSymbol.cpp
50 SBSymbolContext.cpp
51 SBSymbolContextList.cpp
52 SBTarget.cpp
53 SBThread.cpp
Kuba Breckaaaa0b812014-09-06 01:22:55 +000054 SBThreadCollection.cpp
Todd Fiala8a3716b2014-09-30 15:58:56 +000055 SBThreadPlan.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000056 SBType.cpp
57 SBTypeCategory.cpp
Todd Fiala732215f2014-06-02 20:55:29 +000058 SBTypeEnumMember.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000059 SBTypeFilter.cpp
60 SBTypeFormat.cpp
61 SBTypeNameSpecifier.cpp
62 SBTypeSummary.cpp
63 SBTypeSynthetic.cpp
64 SBValue.cpp
65 SBValueList.cpp
Zachary Turner51f96ee2015-02-17 17:55:50 +000066 SBVariablesOptions.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000067 SBWatchpoint.cpp
Todd Fiala802dc4022014-06-23 19:30:49 +000068 SBUnixSignals.cpp
Zachary Turnere6e2bb32015-03-31 21:03:22 +000069 SystemInitializerFull.cpp
Zachary Turner799770c2015-03-18 16:56:24 +000070 ${LLDB_WRAP_PYTHON}
71 ${LLDB_VERS_GENERATED_FILE}
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000072 )
Zachary Turner799770c2015-03-18 16:56:24 +000073
74set_target_properties(liblldb
75 PROPERTIES
76 VERSION ${LLDB_VERSION}
77 )
78
79if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
80 # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
81 # so only it needs to explicitly link against ${PYTHON_LIBRARY}
82 if (MSVC AND NOT LLDB_DISABLE_PYTHON)
83 target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
84 endif()
85else()
86 set_target_properties(liblldb
87 PROPERTIES
88 OUTPUT_NAME lldb
89 )
90endif()
91
92if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE)
93 add_dependencies(liblldb swig_wrapper)
94endif()
95target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
96