diff options
author | Tom Stellard <tstellar@redhat.com> | 2017-07-05 12:57:30 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2017-07-05 12:57:30 +0000 |
commit | edd69bc7789638143d3606bac1f3350ebf5b3fbd (patch) | |
tree | c42750d8ba92a88321cd63cb6a7d3b063ddd6380 | |
parent | fc1675eb16785cebe4286af15d7853ec09854e0b (diff) | |
download | bcm5719-llvm-edd69bc7789638143d3606bac1f3350ebf5b3fbd.tar.gz bcm5719-llvm-edd69bc7789638143d3606bac1f3350ebf5b3fbd.zip |
CMake: Add LLVM_UTILS_INSTALL_DIR option
Summary:
This is like the LLVM_TOOLS_INSTALL_DIR option, but for the utils
that are installed when the LLVM_INSTALL_UTILS. This option
defaults to 'bin' to remain consistent with the current behavior, but
distros may want to install these to libexec/llvm.
Reviewers: beanz
Reviewed By: beanz
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D30655
llvm-svn: 307150
-rw-r--r-- | llvm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | llvm/cmake/modules/AddLLVM.cmake | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index fc05f30e4cd..61ecfdf970d 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -288,6 +288,10 @@ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") mark_as_advanced(LLVM_TOOLS_INSTALL_DIR) +set(LLVM_UTILS_INSTALL_DIR "bin" CACHE STRING + "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)") +mark_as_advanced(LLVM_TOOLS_INSTALL_DIR) + # They are used as destination of target generators. set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 2b54bdbf290..f4d5f4663f2 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -865,7 +865,7 @@ macro(add_llvm_utility name) set_target_properties(${name} PROPERTIES FOLDER "Utils") if( LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS ) install (TARGETS ${name} - RUNTIME DESTINATION bin + RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) if (NOT CMAKE_CONFIGURATION_TYPES) add_custom_target(install-${name} |