From c329a58c1468363a592b9a59c6dddbccaa529b3d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 6 Dec 2017 11:26:34 -0800 Subject: [PATCH 1/3] ignore vcredist when performing fixup_bundle --- cmake/templates/FixupBundlePostBuild.cmake.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/templates/FixupBundlePostBuild.cmake.in b/cmake/templates/FixupBundlePostBuild.cmake.in index d4726884c2..57379bb48b 100644 --- a/cmake/templates/FixupBundlePostBuild.cmake.in +++ b/cmake/templates/FixupBundlePostBuild.cmake.in @@ -45,5 +45,4 @@ else() endif() file(GLOB EXTRA_PLUGINS "${BUNDLE_PLUGIN_DIR}/*.${PLUGIN_EXTENSION}") -fixup_bundle("${BUNDLE_EXECUTABLE}" "${EXTRA_PLUGINS}" "@FIXUP_LIBS@") - +fixup_bundle("${BUNDLE_EXECUTABLE}" "${EXTRA_PLUGINS}" "@FIXUP_LIBS@" IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe") From 008b4285f5a2ca9e4f63c26a57861e3a4ba32586 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 6 Dec 2017 11:35:14 -0800 Subject: [PATCH 2/3] don't use cmake sys library install, grab vcredist as external --- cmake/externals/vcredist/CMakeLists.txt | 21 +++++++++++++++++++++ cmake/macros/GenerateInstallers.cmake | 5 ----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 cmake/externals/vcredist/CMakeLists.txt diff --git a/cmake/externals/vcredist/CMakeLists.txt b/cmake/externals/vcredist/CMakeLists.txt new file mode 100644 index 0000000000..ac242cf451 --- /dev/null +++ b/cmake/externals/vcredist/CMakeLists.txt @@ -0,0 +1,21 @@ +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 6c131168d5..20ab32bf62 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -29,10 +29,6 @@ macro(GENERATE_INSTALLERS) if (WIN32) - # Do not install the Visual Studio C runtime libraries. The installer will do this automatically - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) - - include(InstallRequiredSystemLibraries) set(CPACK_NSIS_MUI_ICON "${HF_CMAKE_DIR}/installer/installer.ico") # install and reference the Add/Remove icon @@ -84,4 +80,3 @@ macro(GENERATE_INSTALLERS) include(CPack) endmacro() - From 99b5b8942a24a3c94bac4f9719beda03b04e013f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 6 Dec 2017 12:08:18 -0800 Subject: [PATCH 3/3] add file download command to install step --- cmake/externals/vcredist/CMakeLists.txt | 21 --------------------- cmake/macros/GenerateInstallers.cmake | 4 ++++ 2 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 cmake/externals/vcredist/CMakeLists.txt 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")