Skip to content

Commit d40d55b

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373482 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f8023e3 commit d40d55b

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

cmake/modules/AddSphinxTarget.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ function (add_sphinx_target builder project)
7171
COMPONENT "${project}-sphinx-man"
7272
DESTINATION ${INSTALL_MANDIR}man1)
7373

74+
if(NOT LLVM_ENABLE_IDE)
75+
add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
76+
DEPENDS ${SPHINX_TARGET_NAME}
77+
COMPONENT "${project}-sphinx-man")
78+
endif()
7479
elseif (builder STREQUAL html)
7580
string(TOUPPER "${project}" project_upper)
7681
set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
@@ -82,6 +87,12 @@ function (add_sphinx_target builder project)
8287
install(DIRECTORY "${SPHINX_BUILD_DIR}/."
8388
COMPONENT "${project}-sphinx-html"
8489
DESTINATION "${${project_upper}_INSTALL_SPHINX_HTML_DIR}")
90+
91+
if(NOT LLVM_ENABLE_IDE)
92+
add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
93+
DEPENDS ${SPHINX_TARGET_NAME}
94+
COMPONENT "${project}-sphinx-html")
95+
endif()
8596
else()
8697
message(WARNING Installation of ${builder} not supported)
8798
endif()

cmake/modules/TableGen.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ macro(add_tablegen target project)
171171

172172
install(TARGETS ${target}
173173
${export_to_llvmexports}
174+
COMPONENT ${target}
174175
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
176+
if(NOT LLVM_ENABLE_IDE)
177+
add_llvm_install_targets("install-${target}"
178+
DEPENDS ${target}
179+
COMPONENT ${target})
180+
endif()
175181
endif()
176182
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
177183
endmacro()

tools/opt-viewer/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ foreach (file ${files})
1111
DESTINATION share/opt-viewer
1212
COMPONENT opt-viewer)
1313
endforeach (file)
14+
15+
add_custom_target(opt-viewer DEPENDS ${files})
16+
if(NOT LLVM_ENABLE_IDE)
17+
add_llvm_install_targets("install-opt-viewer"
18+
DEPENDS opt-viewer
19+
COMPONENT opt-viewer)
20+
endif()

0 commit comments

Comments
 (0)