[Lldb-commits] [lldb] 3ddfb04 - [lldb/CMake] Use PYTHON_LIBRARIES instead of PYTHON_LIBRARY

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 2 13:01:26 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-02T13:01:17-08:00
New Revision: 3ddfb04f41ac60529316f64ae5ab1a8ff1cce6e2

URL: https://github.com/llvm/llvm-project/commit/3ddfb04f41ac60529316f64ae5ab1a8ff1cce6e2
DIFF: https://github.com/llvm/llvm-project/commit/3ddfb04f41ac60529316f64ae5ab1a8ff1cce6e2.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBConfig.cmake
    lldb/source/API/CMakeLists.txt
    lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 64d0750239e8..88f39f235277 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -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()
 

diff  --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 7b9d4cb61e25..d036caf2f434 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -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

diff  --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index e8d1e762effa..9088afe81409 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -19,7 +19,7 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
     lldbHost
     lldbInterpreter
     lldbTarget
-    ${PYTHON_LIBRARY}
+    ${PYTHON_LIBRARIES}
     ${LLDB_LIBEDIT_LIBS}
 
   LINK_COMPONENTS


        


More information about the lldb-commits mailing list