[CMake] [PR31433] Fix LLDB tool installation

This resolves PR 31433.

llvm-svn: 290180
This commit is contained in:
Chris Bieneman 2016-12-20 16:28:18 +00:00
parent 244891d129
commit 11da40b775
1 changed files with 13 additions and 13 deletions

View File

@ -117,7 +117,6 @@ function(add_lldb_executable name)
set_target_properties(${name} PROPERTIES set_target_properties(${name} PROPERTIES
FOLDER "lldb executables") FOLDER "lldb executables")
set(install_dir bin)
if(LLDB_BUILD_FRAMEWORK) if(LLDB_BUILD_FRAMEWORK)
if(ARG_INCLUDE_IN_FRAMEWORK) if(ARG_INCLUDE_IN_FRAMEWORK)
string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR}) string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR})
@ -129,18 +128,19 @@ function(add_lldb_executable name)
set_target_properties(${name} PROPERTIES set_target_properties(${name} PROPERTIES
BUILD_WITH_INSTALL_RPATH On BUILD_WITH_INSTALL_RPATH On
INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}")
if(ARG_GENERATE_INSTALL) endif()
install(TARGETS ${name} endif()
COMPONENT ${name}
RUNTIME DESTINATION ${install_dir}) if(ARG_GENERATE_INSTALL)
if (NOT CMAKE_CONFIGURATION_TYPES) install(TARGETS ${name}
add_custom_target(install-${name} COMPONENT ${name}
DEPENDS ${name} RUNTIME DESTINATION bin)
COMMAND "${CMAKE_COMMAND}" if (NOT CMAKE_CONFIGURATION_TYPES)
-DCMAKE_INSTALL_COMPONENT=${name} add_custom_target(install-${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake") DEPENDS ${name}
endif() COMMAND "${CMAKE_COMMAND}"
endif() -DCMAKE_INSTALL_COMPONENT=${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
endif() endif()
endif() endif()