diff options
author | Daniel Malea <daniel.malea@intel.com> | 2013-05-17 20:55:19 +0000 |
---|---|---|
committer | Daniel Malea <daniel.malea@intel.com> | 2013-05-17 20:55:19 +0000 |
commit | e4c2022b6cc150ab845e32924a184a8b6dc91a67 (patch) | |
tree | 55769c9808edba3e9aea00d21daf6ae48789ed7f /scripts | |
parent | b7d46e3862df0b72b07abab13b96e7898ddd4a1e (diff) | |
download | lldb-e4c2022b6cc150ab845e32924a184a8b6dc91a67.tar.gz |
Fix CMake install target
- copy lldb python module into directory specified with CMAKE_INSTALL_PREFIX
- make liblldb.so a symlink (to liblldb.so.X.Y where X.Y is the LLVM version)
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CMakeLists.txt | 5 | ||||
-rw-r--r-- | scripts/lldb_python_module.cmake | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 48c115c14..6b60ed69b 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -13,3 +13,8 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPE ADD_CUSTOM_TARGET(swig_wrapper ALL echo -n
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
)
+
+# Install the LLDB python module on all operating systems (except Windows)
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+ install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\")
+endif()
diff --git a/scripts/lldb_python_module.cmake b/scripts/lldb_python_module.cmake new file mode 100644 index 000000000..5eaf1ad76 --- /dev/null +++ b/scripts/lldb_python_module.cmake @@ -0,0 +1,14 @@ +# This CMake script installs the LLDB python module from the build directory +# to the install directory. + +# FIXME: if a non-standard version of python is requested, the cmake macro +# below will need Python_ADDITIONAL_VERSIONS set in order to find it. +include(FindPythonInterp) + +SET(PYTHON_DIRECTORY python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + +SET(lldb_module_src ${CMAKE_CURRENT_BINARY_DIR}/lib/${PYTHON_DIRECTORY}) +SET(lldb_module_dest ${CMAKE_INSTALL_PREFIX}/lib) + +MESSAGE(STATUS "Installing LLDB python module from: ${lldb_module_src} to ${lldb_module_dest}") +FILE(COPY "${lldb_module_src}" DESTINATION "${lldb_module_dest}") |