Author: cbieneman Date: Wed Dec 21 15:23:27 2016 New Revision: 290273 URL: http://llvm.org/viewvc/llvm-project?rev=290273&view=rev Log: [CMake] Support distribution install for LLDB.framework
This patch adds the last bit of support to get LLVM_DISTRIBUTION_COMPONENTS working with libLLDB when built as a framework. This patch adds dummy install targets for binaries built into the framework's Resources directory, and makes the framework's install target depend on all the binaries that get installed with the framework. Modified: lldb/trunk/cmake/modules/AddLLDB.cmake Modified: lldb/trunk/cmake/modules/AddLLDB.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=290273&r1=290272&r2=290273&view=diff ============================================================================== --- lldb/trunk/cmake/modules/AddLLDB.cmake (original) +++ lldb/trunk/cmake/modules/AddLLDB.cmake Wed Dec 21 15:23:27 2016 @@ -124,6 +124,16 @@ function(add_lldb_executable name) RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:liblldb>/Resources BUILD_WITH_INSTALL_RPATH On INSTALL_RPATH "@loader_path/../../../../${_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}) + endif() else() set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH On @@ -131,7 +141,7 @@ function(add_lldb_executable name) endif() endif() - if(ARG_GENERATE_INSTALL) + if(ARG_GENERATE_INSTALL AND NOT ARG_INCLUDE_IN_FRAMEWORK) install(TARGETS ${name} COMPONENT ${name} RUNTIME DESTINATION bin) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits