New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvmconfig.cmake.in make cmake installations not relocatable #12529
Comments
two typing mistakes, they should be instead as above set(LLVM_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../../..) |
diff -Nur modules_orig/LLVMConfig.cmake.in modules/LLVMConfig.cmake.in set(TARGET_TRIPLE "@TARGET_TRIPLE@") -set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@) set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) @@ -29,7 +29,7 @@ -set(LLVM_INSTALL_PREFIX @LLVM_INSTALL_PREFIX@)
|
the above patch should fix the problem, hope to see it merged in the codebase |
the patch |
LLVM_TOOLS_BINARY_DIR is correct for installations and should be correct for make build systems but will not work under MSVC builds or xcode Build because they are in a per configuration dir, it's not so easy to solve this. the patch is tested under windows and msvc. |
CMAKE_CURRENT_LIST_FILE variable is provide at least in cmake 2.6.4 version, so this should be enough? |
This can be closed when Brads patches are merged. |
Where are Brad's patches? There's no reference to Brad or his patches in this thread. |
r201048 I didn't test them though. |
I think these patches were all landed. Is there anything else to be done here? |
Nope, this is done. I didn't test it, but we can assume Brad is making use of them. |
Any reason to keep this bug report open? |
This should be all completed. |
mentioned in issue llvm/llvm-bugzilla-archive#15732 |
Extended Description
the installed llvm package is not relocatable and has reference to the source tree, this problem maybe fixed using dynamic relative path calculations as follows:
line21:
set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@)
should be replaced to
set(LLVM_TOOLS_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/../../bin)
line 34
set(LLVM_INSTALL_PREFIX @LLVM_INSTALL_PREFIX@)
to:
set(LLVM_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../..)
line 136:
to
${LLVM_INSTALL_PREFIX}/share/llvm/cmake)
The text was updated successfully, but these errors were encountered: