[Lldb-commits] [lldb] r182157 - Fix CMake install target

Daniel Malea daniel.malea at intel.com
Fri May 17 13:55:19 PDT 2013


Author: dmalea
Date: Fri May 17 15:55:19 2013
New Revision: 182157

URL: http://llvm.org/viewvc/llvm-project?rev=182157&view=rev
Log:
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)


Added:
    lldb/trunk/scripts/lldb_python_module.cmake
Modified:
    lldb/trunk/scripts/CMakeLists.txt
    lldb/trunk/source/CMakeLists.txt

Modified: lldb/trunk/scripts/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=182157&r1=182156&r2=182157&view=diff
==============================================================================
--- lldb/trunk/scripts/CMakeLists.txt (original)
+++ lldb/trunk/scripts/CMakeLists.txt Fri May 17 15:55:19 2013
@@ -13,3 +13,8 @@ set_source_files_properties(${CMAKE_CURR
 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()

Added: lldb/trunk/scripts/lldb_python_module.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb_python_module.cmake?rev=182157&view=auto
==============================================================================
--- lldb/trunk/scripts/lldb_python_module.cmake (added)
+++ lldb/trunk/scripts/lldb_python_module.cmake Fri May 17 15:55:19 2013
@@ -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}")

Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=182157&r1=182156&r2=182157&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Fri May 17 15:55:19 2013
@@ -144,7 +144,11 @@ add_lldb_library(liblldb
   lldb-log.cpp
   ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp
   )
-set_target_properties(liblldb PROPERTIES OUTPUT_NAME lldb)
+set_target_properties(liblldb
+  PROPERTIES
+  OUTPUT_NAME lldb
+  VERSION ${LLDB_VERSION}
+  )
 add_dependencies(liblldb ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp)
 target_link_libraries(liblldb ${LLDB_SYSTEM_LIBS})
 





More information about the lldb-commits mailing list