1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[CMake] Provide a custom target to install LLVM libraries

This simplifies installing all LLVM libraries when doing component
build; now you can include llvm-libraries in distribution components.

Differential Revision: https://reviews.llvm.org/D51603

llvm-svn: 341395
This commit is contained in:
Petr Hosek 2018-09-04 19:10:37 +00:00
parent db413159fc
commit 76928b42ba

View File

@ -983,6 +983,27 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
DEPENDS llvm-headers
COMPONENT llvm-headers)
endif()
# Custom target to install all libraries.
add_custom_target(llvm-libraries)
set_target_properties(llvm-libraries PROPERTIES FOLDER "Misc")
if (NOT CMAKE_CONFIGURATION_TYPES)
add_llvm_install_targets(install-llvm-libraries
DEPENDS llvm-libraries
COMPONENT llvm-libraries)
endif()
get_property(LLVM_LIBS GLOBAL PROPERTY LLVM_LIBS)
if(LLVM_LIBS)
list(REMOVE_DUPLICATES LLVM_LIBS)
foreach(lib ${LLVM_LIBS})
add_dependencies(llvm-libraries ${lib})
if (NOT CMAKE_CONFIGURATION_TYPES)
add_dependencies(install-llvm-libraries install-${lib})
endif()
endforeach()
endif()
endif()
# This must be at the end of the LLVM root CMakeLists file because it must run