diff options
author | Chris Bieneman <beanz@apple.com> | 2016-06-08 21:19:26 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-06-08 21:19:26 +0000 |
commit | eb5b5d9f149a33b70914079a7949cb4947fa75f7 (patch) | |
tree | c1294b09aa46e4ef0fafacfd4fbb83c8431a58ce /cmake | |
parent | 5d0ca71de5e5559a207cf26fc0c67f39c47037b0 (diff) |
[CMake] Support overriding binary install directory
This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag.
This patch is based on patches from and collaboration with Tony Kelman, and replaces http://reviews.llvm.org/D20934.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/AddLLVM.cmake | 4 | ||||
-rw-r--r-- | cmake/modules/TableGen.cmake | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index cc7445fb2cf..789555aee06 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -771,7 +771,7 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) install(TARGETS ${name} EXPORT LLVMExports - RUNTIME DESTINATION bin + RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) if (NOT CMAKE_CONFIGURATION_TYPES) @@ -1211,7 +1211,7 @@ function(llvm_install_symlink name dest) set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) install(SCRIPT ${INSTALL_SYMLINK} - CODE "install_symlink(${full_name} ${full_dest} bin)" + CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" COMPONENT ${component}) if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE) diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index fca7d1bda4b..c88ee3fc196 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -141,7 +141,7 @@ macro(add_tablegen target project) if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(TARGETS ${target} EXPORT LLVMExports - RUNTIME DESTINATION bin) + RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) endif() set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) endmacro() |