[PATCH] Make CMake files generated by the Autoconf build system relocatable.

Brad King brad.king at kitware.com
Tue Jun 30 06:47:47 PDT 2015


On 06/29/2015 05:24 PM, Dan Liew wrote:
> I've attached a new version of the patch. It seems to work for me.

Good.  That works for me and addresses my previous comments.  Thanks!

Debian packaging currently builds/installs with the prefix set to
a path like "/usr/lib/llvm-3.7" and then after installation does
something like:

 mv /usr/lib/llvm-3.7/share/llvm /usr/share/llvm-3.7

before forming the package.  Since after these changes we compute the
prefix and location of everything else relative to LLVMConfig.cmake,
which is now outside the prefix, Debian patching of LLVMConfig.cmake
will have to change to something like this:

- # Compute the installation prefix from the LLVMConfig.cmake file location.
- get_filename_component(LLVM_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
- get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
- get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
- get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
+ set(LLVM_INSTALL_PREFIX "/usr/lib/llvm-3.7")
  set(_LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")

-Brad




More information about the llvm-commits mailing list