Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 1 | include_directories(.)
|
| 2 |
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 3 | if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 4 | include_directories(
|
| 5 | Plugins/Process/Linux
|
| 6 | Plugins/Process/POSIX
|
| 7 | )
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 8 | endif ()
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 9 |
|
| 10 | add_subdirectory(API)
|
| 11 | add_subdirectory(Breakpoint)
|
| 12 | add_subdirectory(Commands)
|
| 13 | add_subdirectory(Core)
|
| 14 | add_subdirectory(DataFormatters)
|
| 15 | add_subdirectory(Expression)
|
| 16 | add_subdirectory(Host)
|
| 17 | add_subdirectory(Interpreter)
|
| 18 | add_subdirectory(Plugins)
|
| 19 | add_subdirectory(Symbol)
|
| 20 | add_subdirectory(Target)
|
| 21 | add_subdirectory(Utility)
|
| 22 |
|
| 23 | set( LLDB_USED_LIBS
|
| 24 | lldbAPI
|
| 25 | lldbBreakpoint
|
| 26 | lldbCommands
|
| 27 | lldbDataFormatters
|
| 28 | lldbHostCommon
|
| 29 | lldbCore
|
| 30 | lldbExpression
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 31 | lldbInterpreter
|
| 32 | lldbSymbol
|
| 33 | lldbTarget
|
| 34 | lldbUtility
|
| 35 |
|
| 36 | # Plugins
|
| 37 | lldbPluginDisassemblerLLVM
|
| 38 | lldbPluginSymbolFileDWARF
|
| 39 | lldbPluginSymbolFileSymtab
|
| 40 | lldbPluginDynamicLoaderStatic
|
| 41 |
|
| 42 | lldbPluginObjectFileMachO
|
| 43 | lldbPluginObjectFileELF
|
| 44 | lldbPluginObjectContainerBSDArchive
|
| 45 | lldbPluginObjectContainerMachOArchive
|
| 46 | lldbPluginProcessGDBRemote
|
| 47 | lldbPluginProcessUtility
|
| 48 | lldbPluginPlatformGDB
|
| 49 | lldbPluginPlatformFreeBSD
|
| 50 | lldbPluginPlatformLinux
|
| 51 | lldbPluginObjectFileMachO
|
| 52 | lldbPluginObjectContainerMachOArchive
|
| 53 | lldbPluginObjectContainerBSDArchive
|
| 54 | lldbPluginPlatformMacOSX
|
| 55 | lldbPluginDynamicLoaderMacOSXDYLD
|
| 56 | lldbPluginDynamicLoaderPosixDYLD
|
| 57 | lldbPluginUnwindAssemblyInstEmulation
|
| 58 | lldbPluginUnwindAssemblyX86
|
| 59 | lldbPluginDynamicLoaderDarwinKernel
|
| 60 | lldbPluginAppleObjCRuntime
|
| 61 | lldbPluginCXXItaniumABI
|
| 62 | lldbPluginABIMacOSX_arm
|
| 63 | lldbPluginABIMacOSX_i386
|
| 64 | lldbPluginABISysV_x86_64
|
| 65 | lldbPluginInstructionARM
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 66 | lldbPluginObjectFilePECOFF
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 67 | lldbPluginOSPython
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 68 | )
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 69 |
|
| 70 | # Windows-only libraries
|
| 71 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
| 72 | list(APPEND LLDB_USED_LIBS
|
| 73 | #lldbHostWindows
|
| 74 | #lldbPluginPlatformWindows
|
| 75 | #Ws2_32
|
| 76 | )
|
| 77 | endif ()
|
| 78 |
|
| 79 | # Linux-only libraries
|
| 80 | if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
| 81 | list(APPEND LLDB_USED_LIBS
|
| 82 | lldbHostLinux
|
| 83 | lldbPluginProcessLinux
|
| 84 | lldbPluginProcessPOSIX
|
| 85 | )
|
| 86 | endif ()
|
| 87 |
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 88 | set( CLANG_USED_LIBS
|
| 89 | clangAnalysis
|
| 90 | clangAST
|
| 91 | clangBasic
|
| 92 | clangCodeGen
|
| 93 | clangDriver
|
| 94 | clangEdit
|
| 95 | clangFrontend
|
| 96 | clangLex
|
| 97 | clangParse
|
| 98 | clangRewriteCore
|
| 99 | clangRewriteFrontend
|
| 100 | clangSema
|
| 101 | clangSerialization
|
| 102 | )
|
| 103 |
|
| 104 | set( LLDB_SYSTEM_LIBS
|
| 105 | edit
|
| 106 | python2.7
|
| 107 | )
|
| 108 |
|
| 109 | set( LLVM_LINK_COMPONENTS
|
| 110 | ${LLVM_TARGETS_TO_BUILD}
|
| 111 | jit
|
| 112 | interpreter
|
| 113 | nativecodegen
|
| 114 | asmparser
|
| 115 | bitreader
|
| 116 | bitwriter
|
| 117 | codegen
|
| 118 | ipo
|
| 119 | selectiondag
|
| 120 | bitreader
|
| 121 | mc
|
| 122 | mcjit
|
| 123 | core
|
| 124 | mcdisassembler
|
| 125 | executionengine
|
| 126 | )
|
| 127 |
|
Daniel Malea | 0856107 | 2013-03-05 21:59:12 +0000 | [diff] [blame] | 128 | set_source_files_properties(${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 129 | set(SHARED_LIBRARY 1)
|
| 130 |
|
| 131 | add_lldb_library(liblldb
|
| 132 | lldb.cpp
|
| 133 | lldb-log.cpp
|
Daniel Malea | 0856107 | 2013-03-05 21:59:12 +0000 | [diff] [blame] | 134 | ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 135 | )
|
| 136 | set_target_properties(liblldb PROPERTIES OUTPUT_NAME lldb)
|
Daniel Malea | 0856107 | 2013-03-05 21:59:12 +0000 | [diff] [blame] | 137 | add_dependencies(liblldb ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp)
|
| 138 | target_link_libraries(liblldb ${LLDB_SYSTEM_LIBS})
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 139 |
|
| 140 | # Determine LLDB revision and repository. GetSourceVersion and GetRepositoryPath are shell-scripts, and as
|
| 141 | # such will not work on Windows.
|
| 142 | if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
| 143 | execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetSourceVersion ${LLDB_SOURCE_DIR}
|
| 144 | OUTPUT_VARIABLE LLDB_REVISION)
|
Sylvestre Ledru | 3863dd0 | 2013-03-16 17:01:13 +0000 | [diff] [blame] | 145 | if ( LLDB_REVISION )
|
| 146 | string(REGEX REPLACE "(\r?\n)+$" "" LLDB_REVISION ${LLDB_REVISION})
|
| 147 | endif()
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 148 |
|
| 149 | execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetRepositoryPath ${LLDB_SOURCE_DIR}
|
| 150 | OUTPUT_VARIABLE LLDB_REPOSITORY)
|
Sylvestre Ledru | 3863dd0 | 2013-03-16 17:01:13 +0000 | [diff] [blame] | 151 | if ( LLDB_REPOSITORY )
|
| 152 | string(REGEX REPLACE "(\r?\n)+$" "" LLDB_REPOSITORY ${LLDB_REPOSITORY})
|
| 153 | string(REPLACE " " "" LLDB_REPOSITORY ${LLDB_REPOSITORY})
|
| 154 | endif()
|
Daniel Malea | 137c4d7 | 2013-02-28 23:11:46 +0000 | [diff] [blame] | 155 |
|
| 156 | set_property(
|
| 157 | SOURCE lldb.cpp
|
| 158 | PROPERTY COMPILE_DEFINITIONS "LLDB_REVISION=\"${LLDB_REVISION}\"" "LLDB_REPOSITORY=\"${LLDB_REPOSITORY}\"")
|
| 159 | endif ()
|
| 160 | # FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only
|
| 161 | # revision parsing solution in tools/clang/lib/Basic/CMakelists.txt.
|
| 162 |
|
Daniel Malea | aebeefd | 2013-02-21 20:58:22 +0000 | [diff] [blame] | 163 |
|
| 164 | install(TARGETS liblldb
|
| 165 | LIBRARY DESTINATION lib)
|