Using LSLCMake.cmake's LSL_install_xyz helper functions will result in an extra installation steps for Unknown components. We can modify the function to accept an argument so the user can optionally specify a component.
function(LSL_install_liblsl)
cmake_parse_arguments(ARG "" "DESTINATION;FRAMEWORK_DESTINATION;COMPONENT" "" ${ARGN})
# Build the optional COMPONENT argument list
set(_component_args "")
if(ARG_COMPONENT)
set(_component_args COMPONENT ${ARG_COMPONENT})
endif()
if(APPLE)
# ...
install(CODE "..." ${_component_args})
elseif(WIN32)
if(_lsl_is_fetched)
install(TARGETS lsl RUNTIME DESTINATION "${ARG_DESTINATION}" ${_component_args})
else()
install(IMPORTED_RUNTIME_ARTIFACTS LSL::lsl RUNTIME DESTINATION "${ARG_DESTINATION}" ${_component_args})
endif()
else()
# Linux — same pattern
endif()
endfunction()
Using LSLCMake.cmake's
LSL_install_xyzhelper functions will result in an extra installation steps for Unknown components. We can modify the function to accept an argument so the user can optionally specify a component.