xref: /openbsd-src/gnu/llvm/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt (revision 5a38ef86d0b61900239c7913d24a05e7b88a58f0)
1if(NOT LLDB_PYTHON_RELATIVE_PATH)
2  message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
3endif()
4add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
5
6if (LLDB_ENABLE_LIBEDIT)
7  list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})
8endif()
9
10add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
11  PythonDataObjects.cpp
12  PythonReadline.cpp
13  ScriptInterpreterPython.cpp
14  ScriptedProcessPythonInterface.cpp
15  SWIGPythonBridge.cpp
16
17  LINK_LIBS
18    lldbBreakpoint
19    lldbCore
20    lldbDataFormatters
21    lldbHost
22    lldbInterpreter
23    lldbTarget
24    ${Python3_LIBRARIES}
25    ${LLDB_LIBEDIT_LIBS}
26
27  LINK_COMPONENTS
28    Support
29  )
30
31if (LLDB_ENABLE_LIBEDIT)
32  target_include_directories(lldbPluginScriptInterpreterPython PUBLIC
33    ${LibEdit_INCLUDE_DIRS}
34  )
35endif()
36