| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 1 | include_directories(.) | 
|  | 2 |  | 
|  | 3 | if ( CMAKE_SYSTEM_NAME MATCHES "Linux" ) | 
|  | 4 | include_directories( | 
|  | 5 | Plugins/Process/Linux | 
|  | 6 | Plugins/Process/POSIX | 
|  | 7 | ) | 
|  | 8 | endif () | 
|  | 9 |  | 
|  | 10 | if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" ) | 
|  | 11 | include_directories( | 
|  | 12 | Plugins/Process/FreeBSD | 
|  | 13 | Plugins/Process/POSIX | 
|  | 14 | ) | 
|  | 15 | endif () | 
|  | 16 |  | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 17 | # Need to export the API in the liblldb.dll for Windows | 
|  | 18 | # The lldbAPI source files are added directly in liblldb | 
|  | 19 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 20 | add_subdirectory(API) | 
|  | 21 | endif () | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 22 | add_subdirectory(Breakpoint) | 
|  | 23 | add_subdirectory(Commands) | 
|  | 24 | add_subdirectory(Core) | 
|  | 25 | add_subdirectory(DataFormatters) | 
|  | 26 | add_subdirectory(Expression) | 
|  | 27 | add_subdirectory(Host) | 
|  | 28 | add_subdirectory(Interpreter) | 
|  | 29 | add_subdirectory(Plugins) | 
|  | 30 | add_subdirectory(Symbol) | 
|  | 31 | add_subdirectory(Target) | 
|  | 32 | add_subdirectory(Utility) | 
|  | 33 |  | 
|  | 34 | set( LLDB_USED_LIBS | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 35 | lldbBreakpoint | 
|  | 36 | lldbCommands | 
|  | 37 | lldbDataFormatters | 
| Zachary Turner | 4ec5d0d | 2014-08-15 23:50:36 +0000 | [diff] [blame] | 38 | lldbHost | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 39 | lldbCore | 
|  | 40 | lldbExpression | 
|  | 41 | lldbInterpreter | 
|  | 42 | lldbSymbol | 
| Saleem Abdulrasool | 1239084 | 2014-03-11 03:08:47 +0000 | [diff] [blame] | 43 | lldbTarget | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 44 | lldbUtility | 
| Saleem Abdulrasool | 1239084 | 2014-03-11 03:08:47 +0000 | [diff] [blame] | 45 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 46 | # Plugins | 
|  | 47 | lldbPluginDisassemblerLLVM | 
|  | 48 | lldbPluginSymbolFileDWARF | 
|  | 49 | lldbPluginSymbolFileSymtab | 
|  | 50 | lldbPluginDynamicLoaderStatic | 
|  | 51 | lldbPluginDynamicLoaderPosixDYLD | 
| Deepak Panickal | 5780657 | 2014-07-21 17:24:05 +0000 | [diff] [blame] | 52 | lldbPluginDynamicLoaderHexagonDYLD | 
| Saleem Abdulrasool | 1239084 | 2014-03-11 03:08:47 +0000 | [diff] [blame] | 53 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 54 | lldbPluginObjectFileMachO | 
|  | 55 | lldbPluginObjectFileELF | 
| Ed Maste | b9fe0dd | 2014-03-25 02:03:28 +0000 | [diff] [blame] | 56 | lldbPluginObjectFileJIT | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 57 | lldbPluginSymbolVendorELF | 
|  | 58 | lldbPluginObjectContainerBSDArchive | 
|  | 59 | lldbPluginObjectContainerMachOArchive | 
|  | 60 | lldbPluginProcessGDBRemote | 
|  | 61 | lldbPluginProcessMachCore | 
|  | 62 | lldbPluginProcessUtility | 
|  | 63 | lldbPluginPlatformGDB | 
|  | 64 | lldbPluginPlatformFreeBSD | 
| Todd Fiala | cfee963 | 2014-07-16 15:03:10 +0000 | [diff] [blame] | 65 | lldbPluginPlatformKalimba | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 66 | lldbPluginPlatformLinux | 
|  | 67 | lldbPluginPlatformPOSIX | 
| Deepak Panickal | a0154f9 | 2013-10-15 12:32:12 +0000 | [diff] [blame] | 68 | lldbPluginPlatformWindows | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 69 | lldbPluginObjectFileMachO | 
|  | 70 | lldbPluginObjectContainerMachOArchive | 
|  | 71 | lldbPluginObjectContainerBSDArchive | 
|  | 72 | lldbPluginPlatformMacOSX | 
|  | 73 | lldbPluginDynamicLoaderMacOSXDYLD | 
|  | 74 | lldbPluginUnwindAssemblyInstEmulation | 
|  | 75 | lldbPluginUnwindAssemblyX86 | 
|  | 76 | lldbPluginAppleObjCRuntime | 
|  | 77 | lldbPluginCXXItaniumABI | 
|  | 78 | lldbPluginABIMacOSX_arm | 
| Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 79 | lldbPluginABIMacOSX_arm64 | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 80 | lldbPluginABIMacOSX_i386 | 
|  | 81 | lldbPluginABISysV_x86_64 | 
| Deepak Panickal | 5780657 | 2014-07-21 17:24:05 +0000 | [diff] [blame] | 82 | lldbPluginABISysV_hexagon | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 83 | lldbPluginInstructionARM | 
| Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 84 | lldbPluginInstructionARM64 | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 85 | lldbPluginObjectFilePECOFF | 
|  | 86 | lldbPluginOSPython | 
|  | 87 | ) | 
|  | 88 |  | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 89 | # Need to export the API in the liblldb.dll for Windows | 
|  | 90 | # The lldbAPI source files are added directly in liblldb | 
|  | 91 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 92 | list(APPEND LLDB_USED_LIBS | 
|  | 93 | lldbAPI | 
|  | 94 | ) | 
|  | 95 | endif () | 
|  | 96 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 97 | # Windows-only libraries | 
|  | 98 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 99 | list(APPEND LLDB_USED_LIBS | 
| Zachary Turner | 35ed132 | 2014-07-28 16:45:18 +0000 | [diff] [blame] | 100 | lldbPluginProcessWindows | 
| Virgile Bello | 3e699d4 | 2014-03-12 16:04:29 +0000 | [diff] [blame] | 101 | lldbPluginProcessElfCore | 
|  | 102 | lldbPluginJITLoaderGDB | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 103 | Ws2_32 | 
|  | 104 | ) | 
|  | 105 | endif () | 
|  | 106 |  | 
|  | 107 | # Linux-only libraries | 
|  | 108 | if ( CMAKE_SYSTEM_NAME MATCHES "Linux" ) | 
|  | 109 | list(APPEND LLDB_USED_LIBS | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 110 | lldbPluginProcessLinux | 
|  | 111 | lldbPluginProcessPOSIX | 
|  | 112 | lldbPluginProcessElfCore | 
| Andrew MacPherson | 17220c1 | 2014-03-05 10:12:43 +0000 | [diff] [blame] | 113 | lldbPluginJITLoaderGDB | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 114 | ) | 
|  | 115 | endif () | 
|  | 116 |  | 
|  | 117 | # FreeBSD-only libraries | 
|  | 118 | if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" ) | 
|  | 119 | list(APPEND LLDB_USED_LIBS | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 120 | lldbPluginProcessFreeBSD | 
|  | 121 | lldbPluginProcessPOSIX | 
|  | 122 | lldbPluginProcessElfCore | 
| Ed Maste | 32aa12b | 2014-03-05 13:57:24 +0000 | [diff] [blame] | 123 | lldbPluginJITLoaderGDB | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 124 | ) | 
|  | 125 | endif () | 
|  | 126 |  | 
|  | 127 | # Darwin-only libraries | 
|  | 128 | if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) | 
|  | 129 | set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c) | 
|  | 130 | add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE} | 
|  | 131 | COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl | 
| Todd Fiala | 5000e28 | 2014-01-18 08:05:32 +0000 | [diff] [blame] | 132 | ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 133 | > ${LLDB_VERS_GENERATED_FILE}) | 
|  | 134 |  | 
|  | 135 | set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1) | 
|  | 136 | list(APPEND LLDB_USED_LIBS | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 137 | lldbPluginDynamicLoaderDarwinKernel | 
|  | 138 | lldbPluginProcessMacOSXKernel | 
|  | 139 | lldbPluginSymbolVendorMacOSX | 
| Jason Molenda | a7b5afa | 2013-11-15 00:17:32 +0000 | [diff] [blame] | 140 | lldbPluginSystemRuntimeMacOSX | 
| Todd Fiala | 8a5c5a0 | 2014-03-13 21:16:13 +0000 | [diff] [blame] | 141 | lldbPluginProcessPOSIX | 
|  | 142 | lldbPluginProcessElfCore | 
|  | 143 | lldbPluginJITLoaderGDB | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 144 | ) | 
|  | 145 | endif() | 
|  | 146 |  | 
|  | 147 | set( CLANG_USED_LIBS | 
|  | 148 | clangAnalysis | 
|  | 149 | clangAST | 
|  | 150 | clangBasic | 
|  | 151 | clangCodeGen | 
|  | 152 | clangDriver | 
|  | 153 | clangEdit | 
|  | 154 | clangFrontend | 
|  | 155 | clangLex | 
|  | 156 | clangParse | 
| Zachary Turner | 0152e73 | 2014-07-16 18:53:18 +0000 | [diff] [blame] | 157 | clangRewrite | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 158 | clangRewriteFrontend | 
|  | 159 | clangSema | 
|  | 160 | clangSerialization | 
| Saleem Abdulrasool | 1239084 | 2014-03-11 03:08:47 +0000 | [diff] [blame] | 161 | ) | 
|  | 162 |  | 
| Sylvestre Ledru | f0f2d58 | 2013-11-15 14:15:10 +0000 | [diff] [blame] | 163 | set(LLDB_SYSTEM_LIBS) | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 164 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") | 
| Todd Fiala | 86dccb3 | 2014-02-26 17:44:00 +0000 | [diff] [blame] | 165 | list(APPEND LLDB_SYSTEM_LIBS edit panel ncurses) | 
| Sylvestre Ledru | f0f2d58 | 2013-11-15 14:15:10 +0000 | [diff] [blame] | 166 | endif() | 
| Ed Maste | 0121e43 | 2014-02-26 18:21:42 +0000 | [diff] [blame] | 167 | # On FreeBSD backtrace() is provided by libexecinfo, not libc. | 
|  | 168 | if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") | 
|  | 169 | list(APPEND LLDB_SYSTEM_LIBS execinfo) | 
|  | 170 | endif() | 
|  | 171 |  | 
| Sylvestre Ledru | f0f2d58 | 2013-11-15 14:15:10 +0000 | [diff] [blame] | 172 | if (NOT LLDB_DISABLE_PYTHON) | 
|  | 173 | list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES}) | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 174 | endif() | 
|  | 175 |  | 
| Todd Fiala | 8a5c5a0 | 2014-03-13 21:16:13 +0000 | [diff] [blame] | 176 | list(APPEND LLDB_SYSTEM_LIBS ${system_libs}) | 
|  | 177 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 178 | set( LLVM_LINK_COMPONENTS | 
|  | 179 | ${LLVM_TARGETS_TO_BUILD} | 
| Zachary Turner | d867520 | 2014-08-07 23:26:01 +0000 | [diff] [blame] | 180 | jit | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 181 | interpreter | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 182 | asmparser | 
|  | 183 | bitreader | 
|  | 184 | bitwriter | 
|  | 185 | codegen | 
|  | 186 | ipo | 
|  | 187 | selectiondag | 
|  | 188 | bitreader | 
|  | 189 | mc | 
|  | 190 | mcjit | 
|  | 191 | core | 
|  | 192 | mcdisassembler | 
|  | 193 | executionengine | 
| Peter Collingbourne | 19676ac | 2013-11-11 04:46:09 +0000 | [diff] [blame] | 194 | option | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 195 | ) | 
|  | 196 |  | 
| Deepak Panickal | a0154f9 | 2013-10-15 12:32:12 +0000 | [diff] [blame] | 197 |  | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 198 | if ( NOT LLDB_DISABLE_PYTHON ) | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 199 | set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp) | 
| Saleem Abdulrasool | 0fb2f5d | 2014-07-21 18:18:52 +0000 | [diff] [blame] | 200 |  | 
|  | 201 | set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1) | 
|  | 202 | if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND | 
|  | 203 | NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") | 
|  | 204 | set_property(SOURCE ${LLDB_WRAP_PYTHON} | 
|  | 205 | APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-sequence-point") | 
|  | 206 | endif () | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 207 | endif() | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 208 | set(SHARED_LIBRARY 1) | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 209 |  | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 210 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 211 | add_definitions( -DEXPORT_LIBLLDB ) | 
|  | 212 | endif() | 
|  | 213 |  | 
|  | 214 | # Need to export the API in the liblldb.dll for Windows | 
|  | 215 | # The lldbAPI source files are added directly in liblldb | 
|  | 216 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
| Todd Fiala | 5d1b9c73 | 2014-06-24 21:38:31 +0000 | [diff] [blame] | 217 | # On Non-Windows, the corresponding file list is maintained in | 
|  | 218 | # source\API\CMakeLists.txt.  When editing this list, do not forget to make a | 
|  | 219 | # corresponding change in that file as well (when appropriate). | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 220 | add_lldb_library(liblldb | 
|  | 221 | lldb.cpp | 
|  | 222 | lldb-log.cpp | 
|  | 223 | API/SBAddress.cpp | 
|  | 224 | API/SBBlock.cpp | 
|  | 225 | API/SBBreakpoint.cpp | 
|  | 226 | API/SBBreakpointLocation.cpp | 
|  | 227 | API/SBBroadcaster.cpp | 
|  | 228 | API/SBCommandInterpreter.cpp | 
|  | 229 | API/SBCommandReturnObject.cpp | 
|  | 230 | API/SBCommunication.cpp | 
|  | 231 | API/SBCompileUnit.cpp | 
|  | 232 | API/SBData.cpp | 
|  | 233 | API/SBDebugger.cpp | 
|  | 234 | API/SBDeclaration.cpp | 
|  | 235 | API/SBError.cpp | 
|  | 236 | API/SBEvent.cpp | 
|  | 237 | API/SBExpressionOptions.cpp | 
|  | 238 | API/SBFileSpec.cpp | 
|  | 239 | API/SBFileSpecList.cpp | 
|  | 240 | API/SBFrame.cpp | 
|  | 241 | API/SBFunction.cpp | 
|  | 242 | API/SBHostOS.cpp | 
|  | 243 | API/SBInstruction.cpp | 
|  | 244 | API/SBInstructionList.cpp | 
|  | 245 | API/SBLineEntry.cpp | 
|  | 246 | API/SBListener.cpp | 
|  | 247 | API/SBModule.cpp | 
|  | 248 | API/SBModuleSpec.cpp | 
|  | 249 | API/SBPlatform.cpp | 
|  | 250 | API/SBProcess.cpp | 
|  | 251 | API/SBQueue.cpp | 
|  | 252 | API/SBQueueItem.cpp | 
|  | 253 | API/SBSection.cpp | 
|  | 254 | API/SBSourceManager.cpp | 
|  | 255 | API/SBStream.cpp | 
|  | 256 | API/SBStringList.cpp | 
|  | 257 | API/SBSymbol.cpp | 
|  | 258 | API/SBSymbolContext.cpp | 
|  | 259 | API/SBSymbolContextList.cpp | 
|  | 260 | API/SBTarget.cpp | 
|  | 261 | API/SBThread.cpp | 
|  | 262 | API/SBType.cpp | 
|  | 263 | API/SBTypeCategory.cpp | 
| Colin Riley | b7fd1bd | 2014-06-03 13:01:18 +0000 | [diff] [blame] | 264 | API/SBTypeEnumMember.cpp | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 265 | API/SBTypeFilter.cpp | 
|  | 266 | API/SBTypeFormat.cpp | 
|  | 267 | API/SBTypeNameSpecifier.cpp | 
|  | 268 | API/SBTypeSummary.cpp | 
|  | 269 | API/SBTypeSynthetic.cpp | 
| Todd Fiala | 5d1b9c73 | 2014-06-24 21:38:31 +0000 | [diff] [blame] | 270 | API/SBUnixSignals.cpp | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 271 | API/SBValue.cpp | 
|  | 272 | API/SBValueList.cpp | 
|  | 273 | API/SBWatchpoint.cpp | 
|  | 274 | Host/Windows/getopt/GetOptInc.cpp | 
|  | 275 | ${LLDB_WRAP_PYTHON} | 
|  | 276 | ${LLDB_VERS_GENERATED_FILE} | 
|  | 277 | ) | 
|  | 278 | else () | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 279 | add_lldb_library(liblldb | 
|  | 280 | lldb.cpp | 
|  | 281 | lldb-log.cpp | 
|  | 282 | ${LLDB_WRAP_PYTHON} | 
|  | 283 | ${LLDB_VERS_GENERATED_FILE} | 
|  | 284 | ) | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 285 | endif () | 
|  | 286 |  | 
|  | 287 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 288 | set_target_properties(liblldb | 
|  | 289 | PROPERTIES | 
|  | 290 | OUTPUT_NAME liblldb | 
|  | 291 | VERSION ${LLDB_VERSION} | 
|  | 292 | ) | 
|  | 293 | else() | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 294 | set_target_properties(liblldb | 
|  | 295 | PROPERTIES | 
|  | 296 | OUTPUT_NAME lldb | 
|  | 297 | VERSION ${LLDB_VERSION} | 
|  | 298 | ) | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 299 | endif() | 
|  | 300 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 301 | if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE) | 
|  | 302 | add_dependencies(liblldb | 
| Deepak Panickal | 627f4ae | 2014-03-03 15:50:36 +0000 | [diff] [blame] | 303 | swig_wrapper | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 304 | ${LLDB_WRAP_PYTHON} | 
|  | 305 | ${LLDB_VERS_GENERATED_FILE} | 
|  | 306 | ) | 
|  | 307 | endif() | 
| Saleem Abdulrasool | e1401eb | 2014-07-20 05:28:55 +0000 | [diff] [blame] | 308 | target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS}) | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 309 |  | 
|  | 310 | # Determine LLDB revision and repository. GetSourceVersion and GetRepositoryPath are shell-scripts, and as | 
|  | 311 | # such will not work on Windows. | 
|  | 312 | if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" ) | 
|  | 313 | execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetSourceVersion ${LLDB_SOURCE_DIR} | 
|  | 314 | OUTPUT_VARIABLE LLDB_REVISION) | 
|  | 315 | if ( LLDB_REVISION ) | 
|  | 316 | string(REGEX REPLACE "(\r?\n)+$" "" LLDB_REVISION ${LLDB_REVISION}) | 
|  | 317 | endif() | 
|  | 318 |  | 
|  | 319 | execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetRepositoryPath ${LLDB_SOURCE_DIR} | 
|  | 320 | OUTPUT_VARIABLE LLDB_REPOSITORY) | 
|  | 321 | if ( LLDB_REPOSITORY ) | 
|  | 322 | # Replace newline characters with spaces | 
|  | 323 | string(REGEX REPLACE "(\r?\n)+" " " LLDB_REPOSITORY ${LLDB_REPOSITORY}) | 
|  | 324 |  | 
|  | 325 | # Remove trailing spaces | 
|  | 326 | string(REGEX REPLACE "(\ )+$" "" LLDB_REPOSITORY ${LLDB_REPOSITORY}) | 
|  | 327 | endif() | 
|  | 328 |  | 
|  | 329 | set_property( | 
|  | 330 | SOURCE lldb.cpp | 
|  | 331 | PROPERTY COMPILE_DEFINITIONS "LLDB_REVISION=\"${LLDB_REVISION}\"" "LLDB_REPOSITORY=\"${LLDB_REPOSITORY}\"") | 
|  | 332 | endif () | 
|  | 333 | # FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only | 
|  | 334 | #        revision parsing solution in tools/clang/lib/Basic/CMakelists.txt. | 
|  | 335 |  | 
| Zachary Turner | 0ab4b48 | 2014-07-10 23:47:42 +0000 | [diff] [blame] | 336 | if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION ) | 
|  | 337 | # Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows) | 
|  | 338 | if ( NOT LLDB_DISABLE_PYTHON ) | 
| Zachary Turner | 0ab4b48 | 2014-07-10 23:47:42 +0000 | [diff] [blame] | 339 | add_custom_command( TARGET liblldb | 
|  | 340 | POST_BUILD | 
|  | 341 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/finishSwigWrapperClasses.py | 
| Zachary Turner | 05c3088 | 2014-07-18 07:06:13 +0000 | [diff] [blame] | 342 | COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/finishSwigWrapperClasses.py --buildConfig=${CMAKE_BUILD_TYPE} "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}/../scripts" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/../scripts" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m | 
| Zachary Turner | 0ab4b48 | 2014-07-10 23:47:42 +0000 | [diff] [blame] | 343 | COMMENT "Python script sym-linking LLDB Python API") | 
|  | 344 | endif () | 
|  | 345 | endif () | 
|  | 346 |  | 
| Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 347 | install(TARGETS liblldb | 
|  | 348 | RUNTIME DESTINATION bin | 
| Deepak Panickal | a0154f9 | 2013-10-15 12:32:12 +0000 | [diff] [blame] | 349 | LIBRARY DESTINATION lib | 
|  | 350 | ARCHIVE DESTINATION lib) |