diff options
author | Shoaib Meenai <smeenai@fb.com> | 2019-05-07 19:00:37 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2019-05-07 19:00:37 +0000 |
commit | 69f1b5326d99d789d0e862f5f42d93637f13da58 (patch) | |
tree | d4dba52933a2365bb03df65106228d633c8f7a38 /cmake/Modules/CompilerRTDarwinUtils.cmake | |
parent | b51c88520398ccc01b44826d37aea23d17ac51a3 (diff) | |
download | compiler-rt-69f1b5326d99d789d0e862f5f42d93637f13da58.tar.gz |
[compiler-rt] Create install targets for Darwin libraries
Darwin targets were generating CMake install rules but not the
corresponding install targets. Centralize the existing install target
creation to a function and use that function for both Darwin and
non-Darwin builds.
Differential Revision: https://reviews.llvm.org/D61541
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTDarwinUtils.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTDarwinUtils.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake index 48f761a2e..5c8745bc5 100644 --- a/cmake/Modules/CompilerRTDarwinUtils.cmake +++ b/cmake/Modules/CompilerRTDarwinUtils.cmake @@ -1,4 +1,5 @@ include(CMakeParseArguments) +include(CompilerRTUtils) # On OS X SDKs can be installed anywhere on the base system and xcode-select can # set the default Xcode to use. This function finds the SDKs that are present in @@ -249,10 +250,18 @@ function(darwin_lipo_libs name) ) add_custom_target(${name} DEPENDS ${LIB_OUTPUT_DIR}/lib${name}.a) + set_target_properties(${name} PROPERTIES FOLDER "Compiler-RT Misc") add_dependencies(${LIB_PARENT_TARGET} ${name}) + + if(CMAKE_CONFIGURATION_TYPES) + set(install_component ${LIB_PARENT_TARGET}) + else() + set(install_component ${name}) + endif() install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a - DESTINATION ${LIB_INSTALL_DIR}) - set_target_properties(${name} PROPERTIES FOLDER "Compiler-RT Misc") + DESTINATION ${LIB_INSTALL_DIR} + COMPONENT ${install_component}) + add_compiler_rt_install_targets(${name} PARENT_TARGET ${LIB_PARENT_TARGET}) else() message(WARNING "Not generating lipo target for ${name} because no input libraries exist.") endif() |