vadimcn created this revision.
vadimcn added reviewers: zturner, hans.
vadimcn added a subscriber: lldb-commits.
vadimcn set the repository for this revision to rL LLVM.
vadimcn added a project: LLDB.
Herald added a subscriber: mgorny.
With this change, "script import lldb" succeeds when executed in installed lldb.
Repository:
rL LLVM
https://reviews.llvm.org/D27476
Files:
scripts/CMakeLists.txt
Index: scripts/CMakeLists.txt
===================================================================
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -11,8 +11,13 @@
include(FindPythonInterp)
-set(SWIG_PYTHON_DIR
-
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+ set(SWIG_PYTHON_DIR
+
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+else()
+ set(SWIG_PYTHON_DIR
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/site-packages)
+endif()
+
set(SWIG_INSTALL_DIR lib${LLVM_LIBDIR_SUFFIX})
# Generating the LLDB framework correctly is a bit complicated because the
@@ -47,10 +52,8 @@
add_custom_target(swig_wrapper ALL DEPENDS ${LLDB_WRAP_PYTHON})
-# Install the LLDB python module on all operating systems (except Windows)
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
- install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
-endif()
+# Install the LLDB python module
+install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
# build Python modules
add_subdirectory(Python/modules)
Index: scripts/CMakeLists.txt
===================================================================
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -11,8 +11,13 @@
include(FindPythonInterp)
-set(SWIG_PYTHON_DIR
- ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+ set(SWIG_PYTHON_DIR
+ ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+else()
+ set(SWIG_PYTHON_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/site-packages)
+endif()
+
set(SWIG_INSTALL_DIR lib${LLVM_LIBDIR_SUFFIX})
# Generating the LLDB framework correctly is a bit complicated because the
@@ -47,10 +52,8 @@
add_custom_target(swig_wrapper ALL DEPENDS ${LLDB_WRAP_PYTHON})
-# Install the LLDB python module on all operating systems (except Windows)
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
- install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
-endif()
+# Install the LLDB python module
+install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
# build Python modules
add_subdirectory(Python/modules)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits