[Lldb-commits] [PATCH] D69834: [lldb] Add a install target for lldb python on darwin

Haibo Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 4 17:06:03 PST 2019


hhb created this revision.
hhb added a reviewer: aadsm.
Herald added subscribers: lldb-commits, mgorny.
Herald added a project: LLDB.

Similar to D68370 <https://reviews.llvm.org/D68370> but for darwin framework build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69834

Files:
  lldb/CMakeLists.txt


Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -216,18 +216,21 @@
   # Ensure we do the python post-build step when building lldb.
   add_dependencies(lldb finish_swig)
 
-  if(NOT LLDB_BUILD_FRAMEWORK)
-    # Install the LLDB python module
-    add_custom_target(lldb-python-scripts)
-    add_dependencies(lldb-python-scripts finish_swig)
-    install(DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/
-            DESTINATION ${LLDB_PYTHON_RELATIVE_PATH}
-            COMPONENT lldb-python-scripts)
-    if (NOT LLVM_ENABLE_IDE)
-      add_llvm_install_targets(install-lldb-python-scripts
-                               COMPONENT lldb-python-scripts
-                               DEPENDS lldb-python-scripts)
-    endif()
+  # Install the LLDB python module
+  if(LLDB_BUILD_FRAMEWORK)
+    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+  else()
+    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
+  endif()
+  add_custom_target(lldb-python-scripts)
+  add_dependencies(lldb-python-scripts finish_swig)
+  install(DIRECTORY ${lldb_python_build_path}/../
+          DESTINATION ${LLDB_PYTHON_INSTALL_PATH}
+          COMPONENT lldb-python-scripts)
+  if (NOT LLVM_ENABLE_IDE)
+    add_llvm_install_targets(install-lldb-python-scripts
+                             COMPONENT lldb-python-scripts
+                             DEPENDS finish_swig)
   endif()
 
   # Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69834.227800.patch
Type: text/x-patch
Size: 1677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191105/289aa1d4/attachment.bin>


More information about the lldb-commits mailing list