blob: ef901c18042de6526c7728a9cd88300e4d45105e [file] [log] [blame]
Zachary Turner7513e822015-02-17 22:20:20 +00001if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
Zachary Turner030b8cb2015-02-24 22:17:57 +00002 add_definitions( -DEXPORT_LIBLLDB )
Zachary Turner7513e822015-02-17 22:20:20 +00003endif()
4
Zachary Turner799770c2015-03-18 16:56:24 +00005# Include this so that add_lldb_library() has the list of dependencies
6# for liblldb to link against
7include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
8
9add_lldb_library(liblldb SHARED
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000010 SBAddress.cpp
Oleksiy Vyalov71d08b32015-02-16 00:04:19 +000011 SBAttachInfo.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000012 SBBlock.cpp
13 SBBreakpoint.cpp
14 SBBreakpointLocation.cpp
15 SBBroadcaster.cpp
16 SBCommandInterpreter.cpp
17 SBCommandReturnObject.cpp
18 SBCommunication.cpp
19 SBCompileUnit.cpp
20 SBData.cpp
21 SBDebugger.cpp
22 SBDeclaration.cpp
23 SBError.cpp
24 SBEvent.cpp
Chandler Carruthb8a4ecb2014-10-01 21:33:28 +000025 SBExecutionContext.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000026 SBExpressionOptions.cpp
27 SBFileSpec.cpp
28 SBFileSpecList.cpp
29 SBFrame.cpp
30 SBFunction.cpp
31 SBHostOS.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000032 SBInstruction.cpp
33 SBInstructionList.cpp
Ilia K7f836242015-04-28 12:51:16 +000034 SBLanguageRuntime.cpp
Oleksiy Vyalov1ef7b2c2015-02-04 23:19:15 +000035 SBLaunchInfo.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000036 SBLineEntry.cpp
37 SBListener.cpp
38 SBModule.cpp
39 SBModuleSpec.cpp
Ed Maste53414042013-11-21 14:38:22 +000040 SBPlatform.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000041 SBProcess.cpp
Jason Molenda5e8dce42013-12-13 00:29:16 +000042 SBQueue.cpp
43 SBQueueItem.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000044 SBSection.cpp
45 SBSourceManager.cpp
46 SBStream.cpp
47 SBStringList.cpp
48 SBSymbol.cpp
49 SBSymbolContext.cpp
50 SBSymbolContextList.cpp
51 SBTarget.cpp
52 SBThread.cpp
Kuba Breckaaaa0b812014-09-06 01:22:55 +000053 SBThreadCollection.cpp
Todd Fiala8a3716b2014-09-30 15:58:56 +000054 SBThreadPlan.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000055 SBType.cpp
56 SBTypeCategory.cpp
Todd Fiala732215f2014-06-02 20:55:29 +000057 SBTypeEnumMember.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000058 SBTypeFilter.cpp
59 SBTypeFormat.cpp
60 SBTypeNameSpecifier.cpp
61 SBTypeSummary.cpp
62 SBTypeSynthetic.cpp
63 SBValue.cpp
64 SBValueList.cpp
Zachary Turner51f96ee2015-02-17 17:55:50 +000065 SBVariablesOptions.cpp
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000066 SBWatchpoint.cpp
Todd Fiala802dc4022014-06-23 19:30:49 +000067 SBUnixSignals.cpp
Zachary Turnere6e2bb32015-03-31 21:03:22 +000068 SystemInitializerFull.cpp
Zachary Turner799770c2015-03-18 16:56:24 +000069 ${LLDB_WRAP_PYTHON}
70 ${LLDB_VERS_GENERATED_FILE}
Joerg Sonnenberger340a1752013-09-25 10:37:32 +000071 )
Zachary Turner799770c2015-03-18 16:56:24 +000072
Zachary Turner2c1f46d2015-07-30 20:28:07 +000073# This should not be part of LLDBDependencies.cmake, because we don't
74# want every single library taking a dependency on the script interpreters.
75target_link_libraries(liblldb PRIVATE
76 lldbPluginScriptInterpreterNone
77 lldbPluginScriptInterpreterPython
78 )
79
Zachary Turner799770c2015-03-18 16:56:24 +000080set_target_properties(liblldb
81 PROPERTIES
82 VERSION ${LLDB_VERSION}
83 )
84
Bruce Mitchener3921fc72015-09-04 00:00:41 +000085if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
86 add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
87endif()
88
Zachary Turner799770c2015-03-18 16:56:24 +000089if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
90 # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
91 # so only it needs to explicitly link against ${PYTHON_LIBRARY}
92 if (MSVC AND NOT LLDB_DISABLE_PYTHON)
93 target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
94 endif()
95else()
96 set_target_properties(liblldb
97 PROPERTIES
98 OUTPUT_NAME lldb
99 )
100endif()
101
102if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE)
103 add_dependencies(liblldb swig_wrapper)
104endif()
105target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
106