Skip to content

Commit db7fc8a

Browse files
committed
restore libspirv install component
1 parent f21453f commit db7fc8a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,12 @@ endfunction()
253253
# Install libclc artifacts.
254254
#
255255
# Arguments:
256+
# * COMPONENT <string>
257+
# Installation component name.
256258
# * FILES <string> ...
257259
# List of libclc artifact files to be installed.
258260
function(libclc_install)
259-
cmake_parse_arguments(ARG "" "" "FILES" ${ARGN})
261+
cmake_parse_arguments(ARG "" "COMPONENT" "FILES" ${ARGN})
260262

261263
if( NOT ARG_FILES )
262264
message( FATAL_ERROR "Must provide FILES" )
@@ -274,6 +276,7 @@ function(libclc_install)
274276
install(
275277
FILES ${files}
276278
DESTINATION ${LIBCLC_INSTALL_DIR}
279+
COMPONENT ${ARG_COMPONENT}
277280
)
278281
endfunction()
279282

@@ -509,7 +512,7 @@ function(add_libclc_builtin_set)
509512
# targets dependent on libclc.
510513
add_dependencies( ${ARG_PARENT_TARGET} prepare-${ARG_TRIPLE} )
511514

512-
libclc_install(FILES ${libclc_builtins_lib})
515+
libclc_install( COMPONENT ${ARG_PARENT_TARGET} FILES ${libclc_builtins_lib} )
513516

514517
# SPIR-V targets can exit early here
515518
if( ARG_ARCH STREQUAL spirv OR ARG_ARCH STREQUAL spirv64 )
@@ -556,7 +559,7 @@ function(add_libclc_builtin_set)
556559
add_dependencies( ${ARG_PARENT_TARGET} ${remangled_filename} )
557560

558561
# Keep remangled variants
559-
libclc_install( FILES ${builtins_remangle_path} )
562+
libclc_install( COMPONENT ${ARG_PARENT_TARGET} FILES ${builtins_remangle_path} )
560563
endforeach()
561564
endforeach()
562565

@@ -615,7 +618,9 @@ function(add_libclc_builtin_set)
615618
set_target_properties( alias-${alias_suffix}
616619
PROPERTIES FOLDER "libclc/Device IR/Aliases"
617620
)
618-
libclc_install(FILES ${LIBCLC_OUTPUT_LIBRARY_DIR}/${alias_suffix})
621+
libclc_install( COMPONENT ${ARG_PARENT_TARGET}
622+
FILES ${LIBCLC_OUTPUT_LIBRARY_DIR}/${alias_suffix}
623+
)
619624
endforeach( a )
620625
endfunction(add_libclc_builtin_set)
621626

0 commit comments

Comments
 (0)