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(NOT LLDB_PYTHON_EXE_RELATIVE_PATH)
7  message(FATAL_ERROR "LLDB_PYTHON_EXE_RELATIVE_PATH is not set.")
8endif()
9add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}")
10
11
12if (LLDB_ENABLE_LIBEDIT)
13  list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})
14endif()
15
16add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
17  PythonDataObjects.cpp
18  PythonReadline.cpp
19  ScriptInterpreterPython.cpp
20  ScriptedPythonInterface.cpp
21  ScriptedProcessPythonInterface.cpp
22  ScriptedThreadPythonInterface.cpp
23  SWIGPythonBridge.cpp
24
25  LINK_LIBS
26    lldbBreakpoint
27    lldbCore
28    lldbDataFormatters
29    lldbHost
30    lldbInterpreter
31    lldbTarget
32    ${Python3_LIBRARIES}
33    ${LLDB_LIBEDIT_LIBS}
34
35  LINK_COMPONENTS
36    Support
37  )
38
39if (LLDB_ENABLE_LIBEDIT)
40  target_include_directories(lldbPluginScriptInterpreterPython PUBLIC
41    ${LibEdit_INCLUDE_DIRS}
42  )
43endif()
44