What works is to add set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
and use install with configurations.
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ${sensor_modules_tps_rxg_installation_dir})
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include (InstallRequiredSystemLibraries)
install (
FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${sensor_modules_tps_rxg_installation_dir}
CONFIGURATIONS Debug
)
I'm not fully happy with this solution as I would prefer to manage the sets independently e.g. (CMAKE_INSTALL_OPENMP_LIBRARIES, CMAKE_INSTALL_UCRT_LIBRARIES) based on the configuration