diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-10-02 16:06:50 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-10-02 16:06:50 +0000 |
commit | c2c419ca788652d018c29c1f473cd554da15d742 (patch) | |
tree | e2ffb2c8da7b80e7224f6cc9d612acec23a1bbe7 /llvm/cmake/modules | |
parent | 91b4085b034ef3a432b0063175f8a3bd96ee089c (diff) | |
download | bcm5719-llvm-c2c419ca788652d018c29c1f473cd554da15d742.tar.gz bcm5719-llvm-c2c419ca788652d018c29c1f473cd554da15d742.zip |
[llvm] [cmake] Add install targets for missing distribution components
Add install targets as necessary to include all files normally installed
in LLVM_DISTRIBUTION_COMPONENTS. This includes targets for Sphinx docs,
opt-viewer Python modules and TableGens.
Differential Revision: https://reviews.llvm.org/D68339
llvm-svn: 373482
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r-- | llvm/cmake/modules/AddSphinxTarget.cmake | 11 | ||||
-rw-r--r-- | llvm/cmake/modules/TableGen.cmake | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake index 22e3dcb776a..2bf654b60c4 100644 --- a/llvm/cmake/modules/AddSphinxTarget.cmake +++ b/llvm/cmake/modules/AddSphinxTarget.cmake @@ -71,6 +71,11 @@ function (add_sphinx_target builder project) COMPONENT "${project}-sphinx-man" DESTINATION ${INSTALL_MANDIR}man1) + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-${SPHINX_TARGET_NAME}" + DEPENDS ${SPHINX_TARGET_NAME} + COMPONENT "${project}-sphinx-man") + endif() elseif (builder STREQUAL html) string(TOUPPER "${project}" project_upper) set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html" @@ -82,6 +87,12 @@ function (add_sphinx_target builder project) install(DIRECTORY "${SPHINX_BUILD_DIR}/." COMPONENT "${project}-sphinx-html" DESTINATION "${${project_upper}_INSTALL_SPHINX_HTML_DIR}") + + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-${SPHINX_TARGET_NAME}" + DEPENDS ${SPHINX_TARGET_NAME} + COMPONENT "${project}-sphinx-html") + endif() else() message(WARNING Installation of ${builder} not supported) endif() diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake index 71dfebb12b4..38e755d6d15 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake @@ -171,7 +171,13 @@ macro(add_tablegen target project) install(TARGETS ${target} ${export_to_llvmexports} + COMPONENT ${target} RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-${target}" + DEPENDS ${target} + COMPONENT ${target}) + endif() endif() set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) endmacro() |