Blame 0001-CMake-Add-LLVM_UTILS_INSTALL_DIR-option.patch

8c425be
From 974c288631ef8d05bf3a3f91b32bf38eae16e5c8 Mon Sep 17 00:00:00 2001
8c425be
From: Tom Stellard <tstellar@redhat.com>
8c425be
Date: Mon, 6 Mar 2017 13:55:55 +0000
8c425be
Subject: [PATCH] CMake: Add LLVM_UTILS_INSTALL_DIR option
8c425be
8c425be
This is like the LLVM_TOOLS_INSTALL_DIR option, but for the utils
8c425be
that are installed when the LLVM_INSTALL_UTILS.  This option
8c425be
defaults to 'bin' to remain consistent with the current behavior, but
8c425be
distros may want to install these to libexec/llvm.
8c425be
---
8c425be
 CMakeLists.txt              | 3 +++
8c425be
 cmake/modules/AddLLVM.cmake | 2 +-
8c425be
 2 files changed, 4 insertions(+), 1 deletion(-)
8c425be
8c425be
diff --git a/CMakeLists.txt b/CMakeLists.txt
8c425be
index 58ee3cf..f93405c 100644
8c425be
--- a/CMakeLists.txt
8c425be
+++ b/CMakeLists.txt
8c425be
@@ -281,6 +281,9 @@ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name
8c425be
 set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
8c425be
 mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
8c425be
 
8c425be
+set(LLVM_UTILS_INSTALL_DIR "bin" CACHE STRING "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to 'bin')")
8c425be
+mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
8c425be
+
8c425be
 # They are used as destination of target generators.
8c425be
 set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
8c425be
 set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
8c425be
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
8c425be
index 7f7608c..0da8162 100644
8c425be
--- a/cmake/modules/AddLLVM.cmake
8c425be
+++ b/cmake/modules/AddLLVM.cmake
8c425be
@@ -864,7 +864,7 @@ macro(add_llvm_utility name)
8c425be
   set_target_properties(${name} PROPERTIES FOLDER "Utils")
8c425be
   if( LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS )
8c425be
     install (TARGETS ${name}
8c425be
-      RUNTIME DESTINATION bin
8c425be
+      RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR}
8c425be
       COMPONENT ${name})
8c425be
     if (NOT CMAKE_CONFIGURATION_TYPES)
8c425be
       add_custom_target(install-${name}
8c425be
-- 
8c425be
2.9.3
8c425be