xref: /llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt (revision f732157a9d067e4d300905c831a964222e0eadee)
1if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
2  # Work around an issue with the Python headers, which have a modular include
3  # inside an extern "C" block.
4  remove_module_flags()
5endif()
6
7if(NOT LLDB_PYTHON_RELATIVE_PATH)
8  message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
9endif()
10add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
11
12if(NOT LLDB_PYTHON_EXE_RELATIVE_PATH)
13  message(FATAL_ERROR "LLDB_PYTHON_EXE_RELATIVE_PATH is not set.")
14endif()
15add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}")
16
17
18if (LLDB_ENABLE_LIBEDIT)
19  list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
20endif()
21
22add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces PLUGIN
23  OperatingSystemPythonInterface.cpp
24  ScriptInterpreterPythonInterfaces.cpp
25  ScriptedPlatformPythonInterface.cpp
26  ScriptedProcessPythonInterface.cpp
27  ScriptedPythonInterface.cpp
28  ScriptedStopHookPythonInterface.cpp
29  ScriptedThreadPlanPythonInterface.cpp
30  ScriptedThreadPythonInterface.cpp
31
32  LINK_LIBS
33    lldbCore
34    lldbHost
35    lldbInterpreter
36    lldbTarget
37    ${Python3_LIBRARIES}
38    ${LLDB_LIBEDIT_LIBS}
39
40  LINK_COMPONENTS
41    Support
42  )
43
44
45