summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-01-10 22:59:00 +0000
committerPetr Hosek <phosek@chromium.org>2018-01-10 22:59:00 +0000
commit02894dbfc6e3775aa06b42bcff0ca3c33b069332 (patch)
treeeafd95c2e3b660c3f9bb63dac0e4bf3ed6822fd1 /cmake
parenta099b7729b512437fbb3ac5c6aff602649a32e6e (diff)
Reland "Install resource files into a share/ directory"
Currently these files are being installed into a root installation directory, but this triggers an error when the installation directory is set to an empty string which is often the case when DESTDIR is used to control the installation destination. Differential Revision: https://reviews.llvm.org/D41673 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@322234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 139b61400..21f8fa794 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -431,7 +431,7 @@ endfunction()
macro(add_compiler_rt_resource_file target_name file_name component)
set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}")
- set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}")
+ set(dst_file "${COMPILER_RT_OUTPUT_DIR}/share/${file_name}")
add_custom_command(OUTPUT ${dst_file}
DEPENDS ${src_file}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file}
@@ -439,7 +439,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
add_custom_target(${target_name} DEPENDS ${dst_file})
# Install in Clang resource directory.
install(FILES ${file_name}
- DESTINATION ${COMPILER_RT_INSTALL_PATH}
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
COMPONENT ${component})
add_dependencies(${component} ${target_name})