mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
variable (now provided both by the normal parent LLVM CMake files and by the LLVMConfig.cmake file used by the standalone build). This allows LLDB to build into and install into correctly suffixed libdirs. This is especially significant for LLDB because the python extension building done by CMake directly uses multilib suffixes when the host OS does, and the host OS will not always look back and forth between them. As a consequence, before LLVM, Clang, and LLDB (and every other subproject) had support for using LLVM_LIBDIR_SUFFIX, you couldn't build or install LLDB on a multilib system with its python extensions enabled. With this patch (on top of all the others I have submitted throughout the project), I'm finally able to build and install LLDB on my system with Python support enabled. I'm also able to actually run the LLDB test suite, etc. Now, a *huge* number of the tests still fail on my Linux system, but hey, actually running them and them testing the debugger is a huge step forward. =D llvm-svn: 224930
20 lines
1005 B
CMake
20 lines
1005 B
CMake
# 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}/site-packages)
|
|
|
|
# Build the readline python module
|
|
include_directories(${PYTHON_INCLUDE_DIR})
|
|
add_library(readline SHARED readline.cpp)
|
|
|
|
# FIXME: the LIBRARY_OUTPUT_PATH seems to be ignored - this is not a
|
|
# functional issue for the build dir, though, since the shared lib dir
|
|
# for the build is in the python shared library load path, and thus
|
|
# python finds it when loading the python readline module.
|
|
set_target_properties(readline PROPERTIES
|
|
PREFIX ""
|
|
LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/${PYTHON_DIRECTORY})
|
|
|
|
# Install the readline module.
|
|
install(TARGETS readline LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/${PYTHON_DIRECTORY})
|