diff --git a/cmake/externals/vcredist/CMakeLists.txt b/cmake/externals/vcredist/CMakeLists.txt deleted file mode 100644 index ac242cf451..0000000000 --- a/cmake/externals/vcredist/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -if (WIN32) - set(EXTERNAL_NAME vcredist) - string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) - - include(ExternalProject) - ExternalProject_Add( - ${EXTERNAL_NAME} - URL https://go.microsoft.com/fwlink/?LinkId=746572 - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - LOG_DOWNLOAD 1 - ) - - # Hide this external target (for ide users) - set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals") - - ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) - - set(${EXTERNAL_NAME_UPPER}_PATH ${SOURCE_DIR} CACHE FILEPATH "Location of VC Redistributable") -endif() diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 20ab32bf62..702636dd01 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -45,6 +45,10 @@ macro(GENERATE_INSTALLERS) set(_UNINSTALLER_HEADER_BAD_PATH "${HF_CMAKE_DIR}/installer/uninstaller-header.bmp") set(UNINSTALLER_HEADER_IMAGE "") fix_path_for_nsis(${_UNINSTALLER_HEADER_BAD_PATH} UNINSTALLER_HEADER_IMAGE) + + # grab the latest VC redist (2017) and add it to the installer, our NSIS template + # will call it during the install + install(CODE "file(DOWNLOAD https://go.microsoft.com/fwlink/?LinkId=746572 \"\${CMAKE_INSTALL_PREFIX}/vcredist_x64.exe\")") elseif (APPLE) # produce a drag and drop DMG on OS X set(CPACK_GENERATOR "DragNDrop")