1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Use CMAKE_INSTALL_BINDIR instead of hardcoding bin for tools install paths

Summary:
This allows customizing the location executables and symlinks get installed to,
as with --bindir in autotools.

Reviewers: loladiro, beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D20934

llvm-svn: 272031
This commit is contained in:
Chris Bieneman 2016-06-07 18:01:16 +00:00
parent 26dc05069f
commit 9fbb86b419
2 changed files with 3 additions and 3 deletions

View File

@ -771,7 +771,7 @@ macro(add_llvm_tool name)
if( LLVM_BUILD_TOOLS ) if( LLVM_BUILD_TOOLS )
install(TARGETS ${name} install(TARGETS ${name}
EXPORT LLVMExports EXPORT LLVMExports
RUNTIME DESTINATION bin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${name}) COMPONENT ${name})
if (NOT CMAKE_CONFIGURATION_TYPES) if (NOT CMAKE_CONFIGURATION_TYPES)
@ -1211,7 +1211,7 @@ function(llvm_install_symlink name dest)
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
install(SCRIPT ${INSTALL_SYMLINK} install(SCRIPT ${INSTALL_SYMLINK}
CODE "install_symlink(${full_name} ${full_dest} bin)" CODE "install_symlink(${full_name} ${full_dest} ${CMAKE_INSTALL_BINDIR})"
COMPONENT ${component}) COMPONENT ${component})
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE) if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)

View File

@ -141,7 +141,7 @@ macro(add_tablegen target project)
if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY) if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(TARGETS ${target} install(TARGETS ${target}
EXPORT LLVMExports EXPORT LLVMExports
RUNTIME DESTINATION bin) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
endmacro() endmacro()