Thank you Robert,
I came up with the following, maybe someone has a better idea:
if (WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit
set(REDIST_ARCH x64)
else()
set(REDIST_ARCH x86)
endif()
set(REDIST_FILE vcredist_${REDIST_ARCH}.exe)
set(CMAKE_INSTALL_SYST
You can use the InstallRequiredSystemLibraries to do this. Since it sounds
like you don't want all the libraries installed, use
CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP and than deduce the path of
vc_redist.exe from the value(s) in CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
On Mon, Sep 4, 2017 at 3:01 AM, R