summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/scripts/CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/scripts/CMakeLists.txt b/lldb/scripts/CMakeLists.txt
index 1a0ea96ff9f..9de96ef5565 100644
--- a/lldb/scripts/CMakeLists.txt
+++ b/lldb/scripts/CMakeLists.txt
@@ -42,13 +42,15 @@ add_custom_target(swig_wrapper ALL DEPENDS
)
if(NOT LLDB_BUILD_FRAMEWORK)
- if(CMAKE_SYSTEM_NAME MATCHES "Windows")
- set(swig_python_subdir site-packages)
+ # The path here should match the result of python function
+ # distutils.sysconfig.get_python_lib().
+ if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+ set(swig_python_subdir Lib/site-packages)
else()
- set(swig_python_subdir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+ set(swig_python_subdir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
endif()
- set(SWIG_PYTHON_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${swig_python_subdir})
+ set(SWIG_PYTHON_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${swig_python_subdir})
set(SWIG_INSTALL_DIR lib${LLVM_LIBDIR_SUFFIX})
# Install the LLDB python module
OpenPOWER on IntegriCloud