diff options
author | Alex Langford <apl@fb.com> | 2018-07-16 19:19:56 +0000 |
---|---|---|
committer | Alex Langford <apl@fb.com> | 2018-07-16 19:19:56 +0000 |
commit | 8d33a085c363a5f4288c7866fe35d48417e2731d (patch) | |
tree | 30302498b75a2abb6eed6b15d76bdd77c4d78c7f /lldb | |
parent | 31e29a4b59fdd33c147f2172b76fa43ace0fa00b (diff) | |
download | bcm5719-llvm-8d33a085c363a5f4288c7866fe35d48417e2731d.tar.gz bcm5719-llvm-8d33a085c363a5f4288c7866fe35d48417e2731d.zip |
[CMake] Give lldb tools functional install targets when building LLDB.framework
Summary:
This change makes the install targets for lldb tools functional when
building for the framework.
I am currently working on the install rules for lldb-framework and this will
let me make `install-lldb-framework` rely on `install-lldb-argdumper` for
instance. This is especially important for `install-lldb-framework-stripped`. It
is much better for `install-lldb-framework-stripped` to rely on
`install-lldb-argdumper-stripped` than to copy and strip lldb-argdumper
manually.
Differential Revision: https://reviews.llvm.org/D49038
llvm-svn: 337202
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/cmake/modules/AddLLDB.cmake | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index 232a957df60..129a5ef7500 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -111,18 +111,6 @@ function(add_lldb_executable name) RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:liblldb>${resource_dir} BUILD_WITH_INSTALL_RPATH On INSTALL_RPATH "@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}") - # For things inside the framework we don't need functional install targets - # because CMake copies the resources and headers from the build directory. - # But we still need this target to exist in order to use the - # LLVM_DISTRIBUTION_COMPONENTS build option. We also need the - # install-liblldb target to depend on this tool, so that it gets put into - # the Resources directory before the framework is installed. - if(ARG_GENERATE_INSTALL) - add_custom_target(install-${name} DEPENDS ${name}) - add_dependencies(install-liblldb ${name}) - add_custom_target(install-${name}-stripped DEPENDS ${name}) - add_dependencies(install-liblldb-stripped ${name}) - endif() endif() endif() @@ -132,10 +120,14 @@ function(add_lldb_executable name) INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") endif() - if(ARG_GENERATE_INSTALL AND NOT (ARG_INCLUDE_IN_SUITE AND LLDB_BUILD_FRAMEWORK )) + if(ARG_GENERATE_INSTALL) + set(out_dir "bin") + if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE) + set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR}) + endif() install(TARGETS ${name} COMPONENT ${name} - RUNTIME DESTINATION bin) + RUNTIME DESTINATION ${out_dir}) if (NOT CMAKE_CONFIGURATION_TYPES) add_llvm_install_targets(install-${name} DEPENDS ${name} |