forked from OSchip/llvm-project
[lldb/CMake] Use PYTHON_LIBRARIES instead of PYTHON_LIBRARY
PYTHON_LIBRARIES is the canonical variable set by FindPythonLibs while PYTHON_LIBRARY is an implementation detail. This replaces the uses of the latter with the former.
This commit is contained in:
parent
086ac7e75c
commit
3ddfb04f41
|
@ -145,7 +145,7 @@ if (LLDB_ENABLE_PYTHON)
|
|||
if(Python3_VERSION VERSION_LESS 3.5)
|
||||
message(SEND_ERROR "Python 3.5 or newer is required (found: ${Python3_VERSION}")
|
||||
endif()
|
||||
set(PYTHON_LIBRARY ${Python3_LIBRARIES})
|
||||
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
|
||||
include_directories(${Python3_INCLUDE_DIRS})
|
||||
|
||||
if (NOT LLDB_RELOCATABLE_PYTHON)
|
||||
|
@ -178,7 +178,7 @@ endif()
|
|||
|
||||
if (NOT LLDB_ENABLE_PYTHON)
|
||||
unset(PYTHON_INCLUDE_DIR)
|
||||
unset(PYTHON_LIBRARY)
|
||||
unset(PYTHON_LIBRARIES)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -172,9 +172,9 @@ endif()
|
|||
|
||||
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
|
||||
# so only it needs to explicitly link against ${PYTHON_LIBRARY}
|
||||
# so only it needs to explicitly link against ${PYTHON_LIBRARIES}
|
||||
if (MSVC AND LLDB_ENABLE_PYTHON)
|
||||
target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
|
||||
target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
set_target_properties(liblldb
|
||||
|
|
|
@ -19,7 +19,7 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
|
|||
lldbHost
|
||||
lldbInterpreter
|
||||
lldbTarget
|
||||
${PYTHON_LIBRARY}
|
||||
${PYTHON_LIBRARIES}
|
||||
${LLDB_LIBEDIT_LIBS}
|
||||
|
||||
LINK_COMPONENTS
|
||||
|
|
Loading…
Reference in New Issue