target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
+
+ if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ NOT LLVM_DISTRIBUTION_COMPONENTS)
+ set(export_to_clangtargets EXPORT ClangTargets)
+ endif()
+
install(TARGETS ${name}
COMPONENT ${name}
- EXPORT ClangTargets
+ ${export_to_clangtargets}
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION bin)
add_clang_executable(${name} ${ARGN})
if (CLANG_BUILD_TOOLS)
+ if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ NOT LLVM_DISTRIBUTION_COMPONENTS)
+ set(export_to_clangtargets EXPORT ClangTargets)
+ endif()
+
install(TARGETS ${name}
+ ${export_to_clangtargets}
RUNTIME DESTINATION bin
COMPONENT ${name})